¬°¦ó¦r¨åªºitem¾É¥X®É·|³ø¿ù(«¬ºA¤£²Å¦X)?
- ©«¤l
- 36
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 77
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- MICROSOFT
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2015-6-7
- ³Ì«áµn¿ý
- 2024-9-22
|
¬°¦ó¦r¨åªºitem¾É¥X®É·|³ø¿ù(«¬ºA¤£²Å¦X)?
¬°¦ó¦r¨å·|³ø¿ù.rar (167.77 KB)
¦r¨åªº¨Ï¥Î¬O¦b³o½×¾Â¾Ç¨ì,¯uªº«Ü¦n¥Î,³o¬O²Ä¤@¦¸¸I¨ì¦r¨å¾É¥X³ø¿ù,KEYȨS¦³°ÝÃD,¦ýITEMȳø¿ù,¤]¤£ª¾¹Dì¦]¥X¦b¨º,¥u¦n¨D±Ï¤F. |
|
|
|
|
|
|
- ©«¤l
- 2834
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2890
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-27
|
YµL¥²n, ¾¨¶q¤£n¨Ï¥Î Transpose,
¦æ¼Æ¤Ó¦h, ¦r¤¸¼Æ¤Ó¦h, ©Î¨ä¥¦ì¦], ·|µo¥Í¤£¥i¹w´Áªº¿ù»~,
¤£¶û³Â·Ð, ¦A¦hÂàÓÅs:
Sub A·sDP§PÂ_()
CL = Application.Match("C/L", [a1:a300], 0) 'C/L©Ò¦b¦C¼Æ
CR2 = Application.Match("CUP PRINT", [a1:a100], 0)
D1 = Application.Match("D/P", [a1:a300], 0) + 2 'D/P¸ê®Æ°Ïº¦C(¤£§t¼ÐÃD¦C)
D2 = Cells(CR2, 1).End(3).Row 'D/P¸ê®Æ°Ï¥½¦C
[I:AD].Clear
Ar = Range(Cells(D1, 1), Cells(D2, 9))
Set D = CreateObject("Scripting.Dictionary")
For x = 1 To UBound(Ar) '±NOS¸ê®Æ¤J°}¦C,item «h¥H"-"±NOS¦ê±µ
D(Ar(x, 3)) = D(Ar(x, 3)) & IIf(D(Ar(x, 3)) = "", "", "-") & Ar(x, 2)
Next x
If D.Count = 0 Then Exit Sub
ReDim Br(1 To D.Count, 1)
For Each a In D.keys
i = i + 1: Br(i, 0) = a: Br(i, 1) = D(a)
Next
Cells(D1, "J").Resize(D.Count, 2) = Br
End Sub
=================================== |
|
|
|
|
|
|
- ©«¤l
- 2834
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 2890
- ÂI¦W
- 0
- §@·~¨t²Î
- ¡e²¤¡f
- ³nÅ骩¥»
- ¡e²¤¡f
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¡e²¤¡f
- µù¥U®É¶¡
- 2013-5-13
- ³Ì«áµn¿ý
- 2024-11-27
|
³oºØ¼gªk, ¦pªG¬Ý±oÀ´, ¥i°Ñ¦Ò:
Sub A·sDP§PÂ__2()
Dim Ar, Br, D, F1 As Range, F2 As Range, i&, N&, T$, U&, V
[J:K].ClearContents
Set F1 = [A:A].Find("D/P", Lookat:=xlWhole)(3, 1) '´M§ä"D/P"ªº¦ì¸m, ¨Ã¦V¤U²¾3®æ(§Y¸ê®Æªº¶}ÀY)
Set F2 = [A:A].Find("CUP PRINT").End(xlUp)(1, 3) '´M§ä"CUP PRINT"ªº¦ì¸m, ¨Ã¦V¤W¨ú«DªÅ¦ì¸m, ¦A¦V¥k²¾3®æ
Ar = Range(F1, F2)
ReDim Br(1 To UBound(Ar), 1 To 2)
Set D = CreateObject("Scripting.Dictionary")
For i = 1 To UBound(Ar)
T = Ar(i, 3): If T = "" Then GoTo 99 'YAMOUNT¬°ªÅ, ²¤¹L
U = D(T) '¨ú±oAMOUNT¤w¦s¤J¦r¨åÀɪº¦ì¸m
If U = 0 Then N = N + 1: U = N: D(T) = N: Br(N, 1) = T '¦pªG©|¥¼¦s¤J¦r¨åÀÉ, N+1»¼¼W¦s¤J, ¨Ã±NAMOUNTÈ©ñ¤JBr°}¦C
Br(U, 2) = Replace(Trim(Br(U, 2) & " " & Ar(i, 2)), " ", "-") '¨Ì¾ÚUȪº¦ì¸m, ±NBÄæ¤å¦r¦s¤JBr
99: Next i
If N > 0 Then Cells(F1.Row, "J").Resize(N, 2) = Br
End Sub
============================== |
|
|
|
|
|
|
- ©«¤l
- 36
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 77
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- MICROSOFT
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2015-6-7
- ³Ì«áµn¿ý
- 2024-9-22
|
¦^´_ 3# ã´£³¡ªL §Ú¤]²q¬O¦r¼Æ¤Óªø,´¿§R¥h¤@¦C´N¨S³ø¿ù,¦ýºô¤WGOOGLE¤]¨S§ä¨ìµª®×,ÁÂÁÂã¤j¹©¤O¬Û§U,ÁÙ´£¨Ñ2ºØ¸Ñªk,§Ú·|¦n¦n¬ã¨sã¤jªº«ä¸ô¤Î·sªº§Þ¥©. |
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 4# ¤d·u´M - Option Explicit
- Sub A·sDP§PÂ_()
- Dim CL As Integer, CR2 As Integer, D1 As Integer, D2 As Integer, D As Object
- Dim ar(), X As Integer, E As Variant
- CL = Application.Match("C/L", [a1:a300], 0) 'C/L©Ò¦b¦C¼Æ
- CR2 = Application.Match("CUP PRINT", [a1:a100], 0)
- D1 = Application.Match("D/P", [a1:a300], 0) + 2 'D/P¸ê®Æ°Ïº¦C(¤£§t¼ÐÃD¦C)
- D2 = Cells(CR2, 1).End(3).Row 'D/P¸ê®Æ°Ï¥½¦C
- [I:AD].Clear:
- ar = Range(Cells(D1, 1), Cells(D2, 9))
- Set D = CreateObject("Scripting.Dictionary")
- For X = 1 To UBound(ar) '±NOS¸ê®Æ¤J°}¦C,item «h¥H"-"±NOS¦ê±µ
- D(ar(X, 3)) = D(ar(X, 3)) & "+" & ar(X, 2)
- Next
- If D.Count = 0 Then Exit Sub
- '***§ï¾î©ñ¤£¨Ï¥Î>>Application.Transpose
- Cells(D1, "J").Resize(, D.Count) = D.keys ''ª÷ÃBÄæ
- Cells(D1 + 1, "j").Resize(, D.Count) = D.ItemS ''OSÄæ
- 'ª½©ñ **¦p°}¦C¤¤¤¸¯Àªº¦r¤¸¼Æ¦³>255 ¤¸¯À >> »Ý¤@¤@ªº¾É¥X
- X = 1
- For Each E In D.keys
- Cells(D1 + 3, "j").Range("A" & X) = E
- Cells(D1 + 3, "k").Range("A" & X) = D(E)
- X = X + 1
- Next
- '*** '***¾î©ñ ¨Ï¥Î>>Application.Transpose*********************************
- Cells(D1 + 3, "L").Resize(D.Count, 1) = Application.Transpose(D.keys) 'ª÷ÃBÄæ
- '°}¦C¤¤¤¸¯Àªº¦r¤¸¼Æ¦³>255 '**¨Ï¥ÎApplication.Transpose·|µo¥Í¿ù»~
- ar = D.ItemS
- ar(0) = Mid(ar(0), 1, 256) 'OSÄæ -->³ø¿ù §ï¬° ar(0) = Mid(ar(0), 1, 255)¬Ý¬Ý
- Cells(D1 + 3, "M").Resize(D.Count, 1) = Application.Transpose(ar) ''OSÄæ -->³ø¿ù
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 36
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 77
- ÂI¦W
- 0
- §@·~¨t²Î
- WIN7
- ³nÅ骩¥»
- MICROSOFT
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2015-6-7
- ³Ì«áµn¿ý
- 2024-9-22
|
¦^´_ 5# GBKEE ·PÁ¤j¤jÄÀºÃ,±z©Mã¤jªºµ{¦¡½X³£¬O§Úªº¾Ç²ßªº³Ì¨Î¨Ó·½. |
|
|
|
|
|
|