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

[µo°Ý] ¦r¦ê§R°£­«½Æ

¦^´_ 1# qaqa3296

¦³ªÅ¦A¬Ý¬Ý ³o¼Ë¥i¤£¥i¥H
  1. Sub test1()
  2. Application.ScreenUpdating = False
  3.     [®Æ¥ó!C2:C6000].ClearContents '²M°£C¸ê®Æ
  4.     Set xD = CreateObject("Scripting.Dictionary") '¦r¨å
  5.     Sheets("®Æ¥ó").Select '¸õ¨ì
  6.     arr = Range([¦ì¸m!A2], [¦ì¸m!D65536].End(xlUp))
  7.     Range(Sheets(2).Cells(2, 1).End(xlDown), Sheets(2).Cells(2, 4)).Sort Sheets(2).Cells(2, 4).End(xlDown)
  8.    
  9.     For I = 1 To UBound(arr)
  10.         If I = UBound(arr) Then Exit For
  11.         If arr(I, 4) <> arr(I + 1, 4) Then
  12.             xD(arr(I, 1)) = xD(arr(I, 1)) & "," & arr(I, 4)
  13.         End If
  14.     Next I
  15.    
  16.     Set xR = Range([A2], [A65536].End(xlUp))
  17.     For Each xT In xR
  18.         Cells(xT.Row, "C") = xD(xT.Value)
  19.     Next
  20.    
  21.     Set xD = Nothing
  22. Application.ScreenUpdating = True
  23. End Sub
½Æ»s¥N½X

TOP

ÁÂÁ ­ã´£¤j¤j ©M hcm19522 ¤j¤j ªº «ü¾É
¥Î .Sort ·|¥X²{ ©_©Çªº°ÝÃD ­nÂI2¦¸°õ¦æ¤~·|¥¿±` ¤£ª¾¹D¬°¬Æ»ò

TOP

        ÀR«ä¦Û¦b : «H¤ß¡B¼Ý¤O¡B«i®ð¤TªÌ¨ã³Æ¡A«h¤Ñ¤U¨S¦³°µ¤£¦¨ªº¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD