½Ð±Ð¨Ì§Ç(¤é«e±µªñªº¥ý¦©)±N®w¦s¶q¦©°£ªº¼gªk
- ©«¤l
- 145
- ¥DÃD
- 42
- ºëµØ
- 0
- ¿n¤À
- 193
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-11-25
- ³Ì«áµn¿ý
- 2024-10-10
|
½Ð±Ð¨Ì§Ç(¤é«e±µªñªº¥ý¦©)±N®w¦s¶q¦©°£ªº¼gªk
|
Adam
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 1# adam2010
¬Ý¤F¦n¤[¤~©ú¥Õ·N«ä , ´N¬O§â®w¦sª«®Æ¤À°t¨ì¦Uq³æ»Ý¨D«á¦©±¼?- Sub balance()
- Dim rStart, rEnd, cStart, cEnd
- Dim ar1, ar2
- Dim minValue
- rStart = 3 'ª«®Æ¶}©l¦C
- rEnd = ActiveSheet.[a2].End(xlDown).Row - 1 'ª«®Æµ²§ô¦C
- cStart = 8 '¤é´Á¶}©lÄæ
- cEnd = ActiveSheet.[a2].End(xlToRight).Column - 1 '¤é´Áµ²§ô¦C
- With ActiveSheet
- ar1 = .Range(.Cells(rStart, "D"), .Cells(rEnd, "E")).Value '®w¦s/«Ý¤J®w ¸ê®Æ
- ar2 = .Range(.Cells(rStart, cStart), .Cells(rEnd, cEnd)).Value 'q³æ»Ý¨D¸ê®Æ
- For i = LBound(ar2, 1) To UBound(ar2, 1)
- For j = LBound(ar2, 2) To UBound(ar2, 2)
- minValue = Application.Min(ar2(i, j), ar1(i, 1))
- If minValue <> 0 Then
- ar2(i, j) = ar2(i, j) - minValue
- ar1(i, 1) = ar1(i, 1) - minValue
- End If
-
- minValue = Application.Min(ar2(i, j), ar1(i, 2))
- If minValue <> 0 Then
- ar2(i, j) = ar2(i, j) - minValue
- ar1(i, 2) = ar1(i, 2) - minValue
- End If
- Next
- Next
- '¼g¦^¤u§@ªí
- .Cells(rStart, "D").Resize(UBound(ar1, 1), UBound(ar1, 2)).Value = ar1
- .Cells(rStart, cStart).Resize(UBound(ar2, 1), UBound(ar2, 2)).Value = ar2
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 145
- ¥DÃD
- 42
- ºëµØ
- 0
- ¿n¤À
- 193
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-11-25
- ³Ì«áµn¿ý
- 2024-10-10
|
·PÁÂstillfish00¤j~¨S¿ù!
¯u·Q¥s±z¤@Án~¯«
¤Ó·PÁ¤F! |
|
Adam
|
|
|
|
|