ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

Range ¤º®e«ü©wªº»yªk­n¦p¦ó¼¶¼g¡C

Range ¤º®e«ü©wªº»yªk­n¦p¦ó¼¶¼g¡C

°ÝÃD
·Q­n¤ñ¹ï¦h±i¸ê®Æªí¡A¬Û¦P¦ì¸mªº¤º®e¬O§_¬Û¦P¡A¥Î Range ­n¦p¦ó¼g¡C
¨Ò¦p¡G­n¤ñ¹ïE6:E12¡A¦b¡u22¡v³o±i Sheet »P¡u°Ñ¦Òªí®æ¡v¡A2ªÌ¬O§_¬Û¦P¡C

¦P±iªí®æ¡A¤£¦P Range ¥i¥H¸Ñ¨M
Set Range_Area1 = Range("E6:E12")
Set Range_Area2 = Range("H6:H12")
Range_Area1.FormulaArray = Range_Area2.FormulaArray

¦ý¤£¦P Sheet ªº¤ñ¹ï­n¦p¦ó¼g
¤w¹Á¸Õ¹L
    '1.Range_X = Range_Area1
    '2.Range_X.Value = Range_Area1.Value
    '3.Range_X.FormulaArray = Range_Area1.FormulaArray
    '4.Range_X = Sheets("°Ñ¦Òªí®æ").Range_Area1

[½t¬G]
¦]¬°²{³õªº¤p©j¤£·|¥Î¸ê®Æ®w¡A§â Excel ·í°µ¬OWord ¦b³B²z¡C
¦]¬°­n¾ã²z¦¨¸ê®Æ®w¡A·Q­n¥Î¥¨¶°¼g¡A¥Î¥H§ì¸ê®Æ¡C
¦ý­n¥ý¦æ¤ñ¹ï¡A¿é¤J¸ê®Æªº¡u³æ¦ì¼Æ¡v¬O§_¬Û¦P¡C
¾ã­Ó¡u³øªí®æ¦¡¡v¬O§_¬Û¦P
Macro_Rng_Test.zip (12.11 KB)

¦^´_ 1# Baracuda


    FormulaArray
   ¶Ç¦^©Î³]©w½d³òªº°}¦C¤½¦¡
¦pªG«ü©w½d³ò¤£¥]§t°}¦C¤½¦¡¡A¥»ÄݩʶǦ^ Null
©Ò¥H©pªº°µªk¬O¤ñ¹ï¤£¥X¨Óªº
  1. Sub nn()
  2. myaddress = "E6:E12"
  3. mystr = Join(Application.Transpose(Sheets("22").Range(myaddress).Value))
  4. mystr1 = Join(Application.Transpose(Sheets("°Ñ¦Òªí®æ").Range(myaddress).Value))
  5. MsgBox IIf(mystr = mystr1, "¬Û¦P", "¤£¦P")
  6. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁ§A¡T¶W¯Åª©¥D¡C
»yªk¤j·§¥i¥H²q¥X§A¼gªºÅÞ¿è¡C
¡u«ü©w½d³ò¤£¥]§t°}¦C¤½¦¡¡A¥»ÄݩʶǦ^ Null¡v³o¤@¬q¡A¬Ý¤£¤ÓÀ´¡C
1.¦]¬°¦P±i Sheet ®É¥i¥H¥Î(·N«ä¬O ¥]§t°}¦C¤½¦¡)¡C
2.¤£¦P±iSheet ®É¡A´NÅܦ¨ ¤£¥]§t°}¦C¤½¦¡¡C
¤£¹L³o­ÓÀ³¸Ó¤£¼vÅT¾ã­ÓVBA ªº¶i«×¡C¥ý®³¨Ó°µ¦A»¡¡C

TOP

¦^´_ 3# Baracuda

Null ÃöÁä¦r¬O¤@ºØ Variant ¦¸«¬ºA¡C·N«üÅÜ¼Æ ¤¤¥¼§t¥¿½Tªº¸ê®Æ¡C
©Ò¥Hªí¥Ü»¡­Y§A«ü©w½d³ò¤º¨S¦³°}¦C¤½¦¡¦s¦b®É´N·|¶Ç¦^¨S¦³­È

¨Ì·Ó§AÀɮפº®e¨Ó¬Ý,Àx¦s®æ¤º¨Ã¥¼§t¦³°}¦C¤½¦¡¶Ç¦^ªº·íµM³£¬ONULL
ª`·Nªº¬O¤£¦P¤u§@ªí½d³ò¼gªk,¥u¬O«ü©w²M·¡¤u§@ªí¦WºÙ½}¤F
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¬°¤H³B¥@­n¤p¤ß²Ó¤ß¡A¦ý¤£­n¡u¤p¤ß²´¡v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD