½Ð°Ýª©¤W¤j¤j¡A³oÓn«ç»ò¼gVBA
- ©«¤l
- 365
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 406
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-11
- ³Ì«áµn¿ý
- 2024-8-24
|
½Ð°Ýª©¤W¤j¤j¡A³oÓn«ç»ò¼gVBA
A B C D E F G
08:45:00 7701 7703 7703 5 1 5
08:45:00 7701 7703 7701 -1 0 -1
08:45:00 7701 7703 7703 2 1 2
08:45:00 7701 7703 7701 -4 0
08:45:00 7701 7703 7701 -1 0 -5(-4+ -1)
08:45:00 7701 7703 7703 5 1 5
08:45:00 7701 7703 7701 -1 0 -1
08:45:01 7701 7702 7702 1 1
08:45:01 7701 7703 7703 2 1 3(1+2)
08:45:01 7701 7702 7701 -1 0
08:45:01 7701 7702 7701 -3 0
08:45:01 7701 7702 7701 -1 0
08:45:01 7701 7702 7701 -1 0 -6(-1+(-3)+(-1)+(-1))
08:45:01 7701 7702 7702 3 1
08:45:01 7701 7703 7703 7 1
08:45:01 7701 7703 7703 1 1
08:45:01 7701 7703 7703 10 1
08:45:01 7701 7704 7704 5 1
08:45:01 7701 7705 7705 15 1
08:45:01 7701 7704 7704 1 1
08:45:01 7701 7704 7704 2 1
08:45:01 7703 7705 7705 2 1
08:45:02 7703 7705 7705 1 1 47(3+7+1+10+5+15+1+2+2+1)
08:45:02 7703 7705 7703 -3 0
08:45:02 7703 7705 7703 -3 0
08:45:02 7703 7705 7703 -6 0
08:45:02 7703 7705 7703 -5 0
08:45:02 7703 7705 7703 -1 0
08:45:02 7703 7705 7703 -3 0
08:45:02 7702 7705 7702 -6 0
08:45:02 7701 7705 7701 -1 0 -28(-3+(-3)+(-6)+(-5)+(-1)+(-3)+(-6)+(-1))
¥H¤W¬O¸ê®Æ®æ¦¡¡AFÄæ¬O§P§OEÄæ¬O¥¿ÈÁÙ¬OtÈ¡A¥¿È¬°1tȬ°0¡A½Ð°Ýª©¤W¤j¤j¦pªG§ÚnGÄæÅã¥ÜEÄ檺ÈVBAn«ç»ò¼g¡A
²³æªº»¡´N¬O§P§O¥¿t¡A³sÄò¤@¼Ëªº´N¬Û¥[¡A¹J¨ì¬Û¤Ïªº´N¿W¥ßÅã¥Ü |
|
|
|
|
|
|
- ©«¤l
- 1446
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 1470
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- Excel 2010 & 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW
- µù¥U®É¶¡
- 2020-7-15
- ³Ì«áµn¿ý
- 2024-10-21
|
¥»©«³Ì«á¥Ñ Andy2483 ©ó 2024-1-12 14:25 ½s¿è
ÁÂÁ½׾Â,ÁÂÁ¦U¦ì«e½ú
«á¾ÇÂǦ¹©«½m²ß°}¦C,¾Ç²ß¤è®×¦p¤U,½Ð¦U¦ì«e½ú«ü±Ð
°õ¦æ«e:
°õ¦æµ²ªG:
Option Explicit
Sub TEST()
Dim Brr, V%, V1%, V2%, i&, N&
Brr = Range([E1], Cells(Rows.Count, "E").End(3)(2))
N = UBound(Brr) - 1
For i = 2 To N
V1 = Val(Brr(i, 1))
V2 = Val(Brr(i + 1, 1))
Brr(i - 1, 1) = ""
V = V + V1
If V1 * V2 > 0 Then GoTo i01
Brr(i - 1, 1) = V: V = 0
i01: Next
[H2].Resize(N - 1, 1) = Brr
End Sub |
|
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y
|
|
|
|
|
- ©«¤l
- 73
- ¥DÃD
- 11
- ºëµØ
- 0
- ¿n¤À
- 100
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 8
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2013-5-11
- ³Ì«áµn¿ý
- 2018-7-25
|
·PÁ «e½ú´£¨Ñ~¬Ý¹L¨ü¯q¨}¦h!!! |
|
|
|
|
|
|
- ©«¤l
- 365
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 406
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-11
- ³Ì«áµn¿ý
- 2024-8-24
|
|
|
|
|
|
|
- ©«¤l
- 365
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 406
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-11
- ³Ì«áµn¿ý
- 2024-8-24
|
¦^´_ 8# c_c_lai
·PÁ¤j¤j¬°¤p§Ì¸Ñ´b |
|
|
|
|
|
|
- ©«¤l
- 2035
- ¥DÃD
- 24
- ºëµØ
- 0
- ¿n¤À
- 2031
- ÂI¦W
- 0
- §@·~¨t²Î
- Win7
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-3-22
- ³Ì«áµn¿ý
- 2024-2-1
|
¥»©«³Ì«á¥Ñ c_c_lai ©ó 2013-10-28 07:32 ½s¿è
¦^´_ 7# ÂŤÑÄR¦À
¤£°õ¦æªºì¦]¥X¦Û¦b [F1] ¬°ªÅ¥Õ¡A¦Ó¥B i ¤§ªì¨Ï³]©wȬ° 1¡A©Ò¥H Do While ¤@¶}©l«K¥¼¯à°õ¦æ¡G(ק令 i = 2)- Dim i As Integer, t As Integer
- i = 1
- With ActiveSheet '«ü©w¤u§@ªí: ActiveSheet->§@¥Î¤¤ªº¤u§@ªí
- Do While .Cells(i, "F") <> ""
½Æ»s¥N½X ¦P®É¡A§Aªº¸ê®Æ¿ý¦@p¦³ 58559 ¦C¡Ai «¬ºA«Å§i¬° ¾ã¼Æ¡A©Ò¥H·|²£¥ÍȪº·¸¦ì°T®§¡C
©Ò¥H쥻ªº i As Integer §ï¦¨ i As Long (ªø¾ã¼Æ)¡A¥t¥~ Loop Until Cells(i - 1, "F") <> Cells(i, "F")-
- Do
- t = t + Cells(i, "e")
- i = i + 1
- Loop Until Cells(i - 1, "F") <> Cells(i, "F")
½Æ»s¥N½X ¦b°õ¦æ¨ì³Ì«á®É·|²£¥Í 1004 ªº¿ù»~°T®§¡A©Ò¥Hµyµyק令¦p¤U¡G- Sub Ex()
- Dim i As Long, t As Integer
-
- i = 2
- With Sheets(1) ' «ü©w¤u§@ªí: ActiveSheet->§@¥Î¤¤ªº¤u§@ªí
- Do
- t = 0
- Do
- t = t + .Cells(i, "e")
- i = i + 1
- Loop Until .Cells(i - 1, "F") <> .Cells(i, "F") Or .Cells(i, "F") = ""
- .Cells(i - 1, "g") = t
- Loop Until i > 2 And .Cells(i, "F") = ""
- End With
- End Sub
½Æ»s¥N½X ³o¤]¬O GBKEE ª©¤jn§Aªþ¤WÀɮתº½t¬G¡A¦]¬°µLÀÉ®×´£¨Ñ¹ê§@´ú¸Õ¡A
¤@¯ë¥u¯à¤Ñ°¨¦æªÅ¡A(·Q¹³¤¤) °µ·§²¤ªº¤ÀªR¸Ñ»¡¤F¡I |
|
|
|
|
|
|
- ©«¤l
- 365
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 406
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-11
- ³Ì«áµn¿ý
- 2024-8-24
|
|
|
|
|
|
|
- ©«¤l
- 365
- ¥DÃD
- 40
- ºëµØ
- 0
- ¿n¤À
- 406
- ÂI¦W
- 0
- §@·~¨t²Î
- Win 7
- ³nÅ骩¥»
- OFFICE 2003
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2012-12-11
- ³Ì«áµn¿ý
- 2024-8-24
|
¦^´_ 4# GBKEE
ÁÙ¬O¨S¤ÏÀ³£°¡AG¤j§A«üªº¤ÏÀ³¥¦·|¦Û¤v¸õ¥X¼Æ¦r¶Ü?? |
|
|
|
|
|
|