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

[µo°Ý] ¸ß°Ý°}¦Cµ{¦¡­þ¸Ì¿ù»~

[µo°Ý] ¸ß°Ý°}¦Cµ{¦¡­þ¸Ì¿ù»~

¥X²{  °}¦C¯Á¤Þ¶W¥X½d³ò
Åã¥Ü¿ù»~½d³ò   ---->  ReDim Preserve ¤å¥»A(1 To n, 1 To 2)
§Ú¬Ý¤£¥X¦³¬Æ»ò°ÝÃD
·Q°Ý¦U¦ì¤j¤j¬O­þ¸Ì¥X¿ù¤F¥H¤Î¦p¦ó§ï¥¿
  1. Public Sub ´ú¸Õ3()
  2. Dim ¤å¥»(), ¤å¥»A()
  3. With Worksheets("1111")

  4. n = 0
  5. ¤å¥» = .Range("P3").Resize(4, 2).Value
  6. For i = 1 To 4
  7.     If ¤å¥»(i, 2) <> Empty Or ¤å¥»(i, 2) <> "µL" Then
  8.         n = n + 1
  9.         
  10.         ReDim Preserve ¤å¥»A(1 To n, 1 To 2)
  11.         For c = 1 To 2
  12.             ¤å¥»A(n, c) = ¤å¥»(i, c)
  13.             
  14.         Next
  15.     End If
  16. Next

  17. End With
  18. End Sub
½Æ»s¥N½X

¦^´_ 1# naruto018
¸Õ¸Õ¬Ý¡I
Public Sub ´ú¸Õ3()
    Dim ¤å¥»(), ¤å¥»A()
   
    With Worksheets("1111")
        n = 0
        ¤å¥» = .Range("P3").Resize(4, 2).Value
        For i = 1 To 4
            If ¤å¥»(i, 2) <> Empty Or ¤å¥»(i, 2) <> "µL" Then
                n = n + 1
        
                '  ReDim Preserve ¤å¥»A(1 To n, 1 To 2)
                ReDim Preserve ¤å¥»A(1 To 2, 1 To n)
                For c = 1 To 2
                    '  ¤å¥»A(n, c) = ¤å¥»(i, c)
                    ¤å¥»A(c, n) = ¤å¥»(i, c)
                Next
            End If
        Next
    End With
End Sub

TOP

¦^´_ 2# c_c_lai


    ·PÁ¤j¤jÀ°§U¡A­×§ï«á´ú¸ÕOK
·Q°Ý¤@¤U¤j¤j¬°¤°»ò§Ú­×§ï«e·|¤£¦æ
¦ÓÂà¸m«á«o¥i¥H©O?

TOP

¦^´_ 3# naruto018
§A¥Î°»´ú¼Ò¦¡«K¥i¸Ñ©Î¤F
ReDim Preserve ¤å¥»A(1 To n, 1 To 2) ªºÅܤơA
»P ReDim Preserve ¤å¥»A(1 To 2,, 1 To n)

TOP

TOP

¦^´_ 3# naruto018


¦]¬° VBA °½Ãi
©³¼h¨S¼g·h¾E¹Lµ{
¦ÛµMµLªk  ReDim Preserve ¤å¥»A(1 To n, 1 To 2)

¦P²z¥çµLªk
ReDim ¤å¥»A(1 To 10)
ReDim Preserve ¤å¥»A( -10 To 10)

TOP

¦^´_ 5# c_c_lai


    ·PÁÂc¤jªº´£¨Ñªººô§}
­ì¨Ó¬O³o¼Ë

·í¨Ï¥Î Preserve «O¯d¦r®É¡A±z¥u¯à§ïÅܦhºû°}¦C¤¤³Ì«á¤@ºûªº¤W¬É¡F¦pªG§ïÅܤF¨ä¥¦ºû¼Æ©Î³Ì«á¤@ºûªº¤U¬É¡A«h·|µo¥Í°õ¦æ¶¥¬qªº¿ù»~¡C

TOP

¦^´_ 6# jackyq


    ·PÁÂJ¤jªº¸Ñ»¡
§Ú¤w¤F¸Ñ¤F

TOP

        ÀR«ä¦Û¦b : ¥Ç¿ù¥XÄb®¬¤ß¡A¤~¯à²M²bµL·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD