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

¬°¦ó¦r¨åªºitem¾É¥X®É·|³ø¿ù(«¬ºA¤£²Å¦X)?

¦^´_ 4# ¤d·u´M
  1. Option Explicit
  2. Sub A·sDP§PÂ_()
  3.     Dim CL As Integer, CR2 As Integer, D1 As Integer, D2 As Integer, D As Object
  4.     Dim ar(), X As Integer, E As Variant
  5.     CL = Application.Match("C/L", [a1:a300], 0)  'C/L©Ò¦b¦C¼Æ
  6.     CR2 = Application.Match("CUP PRINT", [a1:a100], 0)
  7.     D1 = Application.Match("D/P", [a1:a300], 0) + 2  'D/P¸ê®Æ°Ï­º¦C(¤£§t¼ÐÃD¦C)
  8.     D2 = Cells(CR2, 1).End(3).Row 'D/P¸ê®Æ°Ï¥½¦C
  9.     [I:AD].Clear:
  10.     ar = Range(Cells(D1, 1), Cells(D2, 9))
  11.     Set D = CreateObject("Scripting.Dictionary")
  12.     For X = 1 To UBound(ar)  '±NOS¸ê®Æ¤J°}¦C,item «h¥H"-"±NOS¦ê±µ
  13.         D(ar(X, 3)) = D(ar(X, 3)) & "+" & ar(X, 2)
  14.     Next
  15.     If D.Count = 0 Then Exit Sub
  16.      '***§ï¾î©ñ¤£¨Ï¥Î>>Application.Transpose
  17.       Cells(D1, "J").Resize(, D.Count) = D.keys ''ª÷ÃBÄæ
  18.       Cells(D1 + 1, "j").Resize(, D.Count) = D.ItemS ''OSÄæ
  19.     'ª½©ñ **¦p°}¦C¤¤¤¸¯Àªº¦r¤¸¼Æ¦³>255 ¤¸¯À >> »Ý¤@¤@ªº¾É¥X
  20.      X = 1
  21.      For Each E In D.keys
  22.         Cells(D1 + 3, "j").Range("A" & X) = E
  23.         Cells(D1 + 3, "k").Range("A" & X) = D(E)
  24.         X = X + 1
  25.      Next
  26.      '*** '***¾î©ñ ¨Ï¥Î>>Application.Transpose*********************************
  27.       Cells(D1 + 3, "L").Resize(D.Count, 1) = Application.Transpose(D.keys) 'ª÷ÃBÄæ
  28.        '°}¦C¤¤¤¸¯Àªº¦r¤¸¼Æ¦³>255  '**¨Ï¥ÎApplication.Transpose·|µo¥Í¿ù»~
  29.        ar = D.ItemS
  30.       ar(0) = Mid(ar(0), 1, 256) 'OSÄæ -->³ø¿ù §ï¬° ar(0) = Mid(ar(0), 1, 255)¬Ý¬Ý
  31.       Cells(D1 + 3, "M").Resize(D.Count, 1) = Application.Transpose(ar) ''OSÄæ -->³ø¿ù
  32. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ­×¦æ­nô½t­×¤ß¡AÂǨƽm¤ß¡AÀH³B¾i¤ß¡C
ªð¦^¦Cªí ¤W¤@¥DÃD