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

[µo°Ý] °}¦C¤j¤p¦p¦ó¥HÅܼƴÀ¥N

[µo°Ý] °}¦C¤j¤p¦p¦ó¥HÅܼƴÀ¥N

[ª©¥DºÞ²z¯d¨¥]
  • GBKEE(2019/3/8 10:56): ¬Ý§Aªºµ{¦¡½X¨S°ÝÃD,¥iªþÀÉÅý¤j®a¬Ý¬Ý

§Ú·Q¦bÀx¦s®æ¿é¤J¤@­Ó¼Æ­È¡A¨Ó¨M©w Br °}¦Cªº¤j¤p¡AµM«á§â°}¦Cªº¤¸¯À¦s¤J¦r¨å¸Ì¡A¦ý¬O¥X²{¤F"°}¦C¯Á¤Þ¶W¥X½d³ò"ªº´£¥Ü¡A½Ð°Ý¦U¦ì¤j¤j¬O­þ¸Ì¥X¿ù¤F?
Dim Br() As String,k%
k = [U1].Value
Set d = CreateObject("Scripting.Dictionary")
For Each A In Range([A9], [A6000].End(xlUp))
   ReDim Preserve Br(k)
    For j = 1 To k
      Br(j) = A.Offset(, j + 159).Value
    Next j
    d(A & "") = Br(k)
Next
Jess

ReDim Preserve Br(k)
§ï¦¨>> ReDim Br(1 To k)

TOP

¦^´_ 2# ­ã´£³¡ªL
­ã¤j¡A§Ú¸Õ¤F¡AÁÙ¬O¦P¼Ë¥X²{°»¿ù¡C
Jess

TOP

try .....

d(A & "") = Br

TOP

ª©¥DGBKEE
¦]¬°³oµ{¦¡¬O­n«ö³]©w¦nªº¸ô®|¶}±Ò¥t¤@­Ó¬¡­¶Ã¯¥h§ì¸ê®Æ¡A©Ò¥H½d¨ÒÀÉ«ÜÃø°µ¡A§Ú¦b·Q¬O¤£¬OÂà¸ê®Æªº³¡¤À¦³»~¡A§Ú¦A¶K¥XÂà¸ê®Æªº³¡¤À¦p¤U
    For Each A In .Range(.[F12], .[F10000].End(xlUp))
      If d.exists(A & "") Then
      A.Offset(, 15).Resize(, k) = d(A & "")
      Else: A.Offset(, 1).Value = "¬dµL¦¹ PN"
      End If
    Next
Jess

TOP

¦^´_ 4# jackyq
j¤j¡A¦P¼Ë°»¿ù
Jess

TOP

¶K¥X­ì©lµ{¦¡½X¡A¬¡­¶Ã¯¤Î¤u§@ªí¦WºÙ¦³²¤°µ­×§ï
  1. Option Base 1
  2. ¶}±Ò¥t¤@­Ó«D¤u§@¤¤¬¡­¶Ã¯WK(¥H¤U¬Ù²¤).
  3. .
  4. .
  5. .

  6. With Sheets("Inventory Report")
  7. IRM1 = .[C4]
  8. IRM2 = .[C5]
  9. Set d = CreateObject("Scripting.Dictionary")
  10. Set d1 = CreateObject("Scripting.Dictionary")

  11. For Each A In .Range(.[A9], .[A6000].End(xlUp))

  12. Dim Ar(13), Br(24)
  13.     For i = 1 To 13
  14.     Ar(i) = A.Offset(, i).Value
  15.     Next i
  16.     d(A & "") = Ar
  17.    
  18.     For j = 1 To 24
  19.     Br(j) = A.Offset(, j + 159).Value
  20.     Next j
  21.     d1(A & "") = Br

  22. Next
  23. End With

  24. Workbooks("L.xlsm").Activate
  25. With Sheets("A INV Report")
  26. .[E10,G10,G11,G12:AR3000].ClearContents
  27. .[G10] = IRM1
  28. .[G11] = IRM2
  29. If .[H9] Like "* A *" Then: .[E10] = "A"
  30. If .[H9] Like "* B *" Then: .[E10] = "B"

  31.     For Each A In .Range(.[F12], .[F10000].End(xlUp))
  32.       If d.exists(A & "") Then
  33.       A.Offset(, 1).Resize(, 13) = d(A & "")
  34.       End If
  35.       If d1.exists(A & "") Then
  36.       A.Offset(, 15).Resize(, 24) = d1(A & "")
  37.       Else: A.Offset(, 1).Value = "¬dµL¦¹ PN"
  38.       End If
  39.     Next
  40. End With

  41. Erase Ar,Br
  42. Set d = Nothing
  43. Set d1 = Nothing
  44. End Sub
½Æ»s¥N½X
Jess

TOP

¤£¬O¥u¦³ Array
¥H¤U¤]·|²£¥Í "°}¦C¯Á¤Þ¶W¥X½d³ò"

Workbooks("¤£¦s¦bªºwb").Activate
Sheets("¤£¦s¦bªºws").Select

TOP

¦^´_ 8# jackyq
­ì©lµ{¦¡°õ¦æ¨S¦³°ÝÃD¡A§Ú¥u¬O·Q§â­ì¥»ªºBr°}¦C(¤j¤p©T©w¬°24­Ó¤¸¯À)§ï¦¨¥i¨ÌÀx¦s®æ¿é¤Jªº¼Æ­ÈÀH·NÅܰʤj¤p
Jess

TOP

¥»©«³Ì«á¥Ñ jackyq ©ó 2019-3-8 22:03 ½s¿è

' ¦³¥i¯à§Aªº k­È ¥X²{ <=0
' §A¥i¥H¸Õ¸Õ¤U­±

Option Base 1  

Sub QX9650_____()

Dim a()


k = 10
ReDim a(k)

k = 1
ReDim a(k)

k = 0
ReDim a(k)  '§A§â°}¦C¤U­­³]¬° 1 , µ²ªGÅܦ¨ Redim  a(1 to 0)

End Sub




'    If k >= 1 Then
'        For Each a In .Range(.[A9], .[A6000].End(xlUp))
'            ReDim Br(k)
'
'            For j = 1 To k
'            Br(j) = a.Offset(, j + 159).Value
'            Next j
'            d1(a & "") = Br
'        Next
'    End If

TOP

        ÀR«ä¦Û¦b : ¡i»X½ªªº¦Û¥Ñ¡j¤H±`¦b¤°»ò³£¥i¥H¦Û¥Ñ¦Û¦bªº®É­Ô¡A«o³Q³oºØÀH¤ß©Ò±ýªº¦Û¥Ñ»X½ª¡AµêÂY®É¥ú¦Ó²@µLıª¾¡C
ªð¦^¦Cªí ¤W¤@¥DÃD