- ©«¤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
        
|
¦^´_ 2# 317
¸Õ¸Õ¬Ý- Option Explicit
- Dim D As Object
- Sub Main()
- ®w¦s¬ö¿ý
- ¥X¤J¬ö¿ý
- End Sub
- Sub ®w¦s¬ö¿ý()
- Dim i As Integer, S As String
- Set D = CreateObject("SCRIPTING.DICTIONARY") '¦r¨åª«¥ó
- On Error GoTo OP
- With Workbooks("®w¦s.xlsx").Sheets("¤u§@ªí1")
- i = 3
- Do While .Cells(i, "C") <> ""
- S = .Cells(i, "C") & .Cells(i, "O")
- D(S) = D(S) + .Cells(i, "G")
- i = i + 1
- Loop
- End With
- Exit Sub
- OP:
- Workbooks.Open ("³o¸Ì¿é¤J [®w¦s.xlsx] Àɮ׸ô®|")
- Resume
- End Sub
- Sub ¥X¤J¬ö¿ý()
- Dim i As Integer, S As String
- On Error GoTo OP
- With Workbooks("¥X¤J°O¿ý.xlsx").Sheets("¤u§@ªí1")
- i = 4
- Do While .Cells(i, "B") <> ""
- S = .Cells(i, "B") & .Cells(i, "G")
- If D.EXISTS(S) Then
- .Cells(i, "J") = D(S)
- .Cells(i, "L") = .Cells(i, "I") + .Cells(i, "K") - D(S)
- Else
- .Cells(i, "J") = ""
- .Cells(i, "L") = .Cells(i, "I") + .Cells(i, "K")
- End If
- i = i + 1
- Loop
- End With
- Exit Sub
- OP:
- Workbooks.Open ("³o¸Ì¿é¤J [¥X¤J°O¿ý.xlsx] Àɮ׸ô®|")
- Resume
- End Sub
½Æ»s¥N½X |
|