- ©«¤l
- 552
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 578
- ÂI¦W
- 0
- §@·~¨t²Î
- win7
- ³nÅ骩¥»
- office 2010
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2015-2-8
- ³Ì«áµn¿ý
- 2024-7-9
|
¥»©«³Ì«á¥Ñ lpk187 ©ó 2015-4-15 20:26 ½s¿è
¦^´_ 8# sabery
µ{§Ç¤¤±ø¥ó¤£¦P¡A¾ãÅ骺µ{§Ç¤]·|¸òµÛ¤jÅܰʪº¡A¤£¤@©w¬O§A±q¤¤¶¡´¡¤J´N¥i¥H§¹¦¨ªº¡C
ì¨Óªº¨ºÓµ{§Ç©M§A«e±ªº±ø¥ó¬Û®t¤Ó¦h¡A©Ò¥H¾ãÓµ²ºc¤]«ÜÃø¬Û¦P
©Ò¥H§Ú¤S·Q¤F·s¼W±ø¥óªº·sµ²ºc©M¤§«eªº¤£¦P- Sub TEST2()
- Dim i As Integer
- Sheets("A").Select
- i = 6
- Do While Range("B" & i) <> ""
- SSS = Range("B" & i) 'Æ[¹îÅܼƥÎ,¥i¥H§R°£³o¦C
- If Range("D" & i) <> "" Then GoTo 100
- Set c = Sheets("B").Columns(1).Find(Range("B" & i), , , , , 2) '´M§ä¬O§_¦b¦s´Ú¤¤¦³±b¤á
- If c Is Nothing Then '¦pªG¨S¦³´N°õ¦æ³oÓµ{§Ç
- Range("D" & i) = "¤£°÷"
- GoTo 100
- End If
- QQQ = c.Offset(0, 1).Value 'Ū¨ú¤u§@ªí"B"¬Y¤Hªº¦s´Ú
- AAA = QQQ - Range("C" & i) '¬Y¤Hªº¦s´Ú-²Ä¤@¦¸ªá¶O
- Range("D" & i) = AAA
- Set DepRow = Columns(2).Find(Range("B" & i), Range("B" & i), , , , 1) '´M§ä¤U¤@Ó¬Y¤Hªºªá¶O
- Do While DepRow.Offset(0, 2).Value = "" '¤@ª½´M§ä¬Y¤Hªºªá¶O,ª½¨ì§ä¤£¨ì¬°¤î
- AAA = AAA - DepRow.Offset(0, 1)
- DepRow.Offset(0, 2) = AAA
- Set DepRow = Columns(2).FindNext(DepRow)
- BBB = DepRow.Row 'Æ[¹îÅܼƥÎ,¥i¥H§R°£³o¦C
- Loop
- 100: '«·sÁÙìÅܼÆÈ
- AAA = ""
- i = i + 1
- Set c = Nothing
- Loop
- MsgBox " TEST! "
- End Sub
½Æ»s¥N½X |
|