- ©«¤l
- 835
- ¥DÃD
- 6
- ºëµØ
- 0
- ¿n¤À
- 915
- ÂI¦W
- 16
- §@·~¨t²Î
- Win 10,7
- ³nÅ骩¥»
- 2019,2013,2003
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2024-11-14
|
¥»©«³Ì«á¥Ñ luhpro ©ó 2013-10-8 23:33 ½s¿è
¦^´_ 1# ©P¤j°¶
ModuleThisWorkbook- Private Sub Workbook_Open()
- Dim lTRow&
- Dim shSou As Worksheet
-
- Set shSou = Sheets("¤u§@ªí1")
- Set dNum = CreateObject("Scripting.Dictionary")
-
- With Sheets("¤u§@ªí2")
- lTRow = 2
- Do While .Cells(lTRow, 1) <> ""
- dNum(CStr(.Cells(lTRow, 1))) = dNum(CStr(.Cells(lTRow, 1))) + .Cells(lTRow, 5)
- .Cells(lTRow, 9) = dNum(CStr(.Cells(lTRow, 1)))
- lTRow = lTRow + 1
- Loop
- End With
- End Sub
½Æ»s¥N½X Sheets("¤u§@ªí1")- Private Sub CommandButton1_Click()
- Dim lSRow&, lTRow&, lTRows&
- Dim shSou As Worksheet
-
- Set shSou = Sheets("¤u§@ªí1")
- With Sheets("¤u§@ªí2")
- lTRows = .Cells(Rows.Count, 1).End(xlUp).Row
- For lSRow = 15 To 34
- lTRow = lTRows + lSRow - 14
- .Cells(lTRow, 1) = shSou.Cells(lSRow, 4)
- .Cells(lTRow, 2) = shSou.Cells(lSRow, 6)
- .Cells(lTRow, 3) = shSou.Cells(lSRow, 8)
- .Cells(lTRow, 4) = shSou.Cells(lSRow, 10)
- .Cells(lTRow, 5) = shSou.Cells(lSRow, 11)
- dNum(CStr(.Cells(lTRow, 1))) = dNum(CStr(.Cells(lTRow, 1))) + .Cells(lTRow, 5)
- .Cells(lTRow, 9) = dNum(CStr(.Cells(lTRow, 1)))
- shSou.Cells(lSRow, 13) = dNum(CStr(.Cells(lTRow, 1)))
- Next lSRow
- End With
½Æ»s¥N½X
¬¡¶Ã¯1-a.zip (17.76 KB)
|
|