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

[µo°Ý] ¦p¦ó¥¿½T«Å§i,ÁקK±j¨îÂ૬®É­°§C³t«×

[µo°Ý] ¦p¦ó¥¿½T«Å§i,ÁקK±j¨îÂ૬®É­°§C³t«×

¥»©«³Ì«á¥Ñ PKKO ©ó 2015-5-29 10:02 ½s¿è

EX :
  1. For j = 1 To UBound(Rng4, 2)
  2.     '§ä¥X°}¦CªºC
  3.      If CStr(RNG(1, i)) = CStr(RNG2(1, j)) Then
  4.          c = j
  5.          Exit For
  6.      End If
  7. Next
½Æ»s¥N½X
³o¬O­ì¥»ªº§@ªk
¤ñ¸ûªº®É­Ô­n¨âÃä¦P®ÉÂ૬¦¨¦r¦ê,µ§§K¦]«¬§O¤£¦P¦Ó¨S¦³¥¿½T¤ñ¹ï
¦ý³o¼Ë¦ü¥G¤ñ¸ûºC

¦³¬Æ»ò¤è¦¡¥i¥H¦b¤@¶}©l´NÅýrng³o­Ó°}¦Cªº¤º®e³£­­¨î¬°¦r¦ê©O?
¥i¬O°}¦C¨Ó·½¬O¨Ó¦Û©ó Rng=[a1].currentregion
PKKO

¦^´_ 1# PKKO
  1. Option Explicit
  2. Sub Ex()
  3.     Dim Ar() As String, Ar1(), i, ii
  4.     Ar1 = UsedRange.Value
  5.     ReDim Ar(1 To UBound(Ar1, 1), 1 To UBound(Ar1, 2))
  6.      For i = 1 To UBound(Ar1, 1)
  7.         For ii = 1 To UBound(Ar1, 2)
  8.             Ar(i, ii) = Ar1(i, ii)
  9.         Next
  10.      Next
  11. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 2# GBKEE

·PÁ¶Wª©¤j¤jªº¦^ÂÐ

¦ý§Ú·Q°Ýªº¬O³o­Ó³¡¤À,­n¦p¦ó¯à³o¼Ë«Å§i?
    Dim Ar() As String, Ar1() As String, i, ii
    Ar1() = [a1].CurrentRegion'³o¦æ·|¿ù»~
PKKO

TOP

¥»©«³Ì«á¥Ñ bobomi ©ó 2015-5-29 14:56 ½s¿è

EXCEL ¥X¨Óªº¥þ³¡³£¬O Variant
§AµL±q§ïÅÜ¥L
±j¨îÂ૬¬O¥²µMªº

VB¤]¨S¦³¤ä´©°}¦Cª½±µÂ૬³oºØªF¦è (  AR_String( ) = AR_Variant( )   )

TOP

¦^´_ 4# bobomi


    ·PÁÂ!
PKKO

TOP

        ÀR«ä¦Û¦b : Ãø¦æ¯à¦æ¡AÃø±Ë¯à±Ë¡AÃø¬°¯à¬°¡A¤~¯àª@µØ¦Û§Úªº¤H®æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD