- ©«¤l
- 154
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 200
- ÂI¦W
- 30
- §@·~¨t²Î
- windwos 7
- ³nÅ骩¥»
- 64bit
- ¾\ŪÅv
- 20
- µù¥U®É¶¡
- 2017-5-29
- ³Ì«áµn¿ý
- 2024-11-25
|
¦^´_ 6# quickfixer
×¥¿#6,§Ñ¤F¨S¦³Àˬdªº»Ýn,¥h±¼¤Ffunction,ÁYµuµ{¦¡½X
Sub total()
Dim d1 As Date, d2 As Date, t, sn As String
d1 = DateValue(Split(Replace(Replace(Sheets("·JÁ`").Range("b1"), "¦~", "/"), "¤ë", ""), "~")(0))
d2 = DateValue(Split(Replace(Replace(Sheets("·JÁ`").Range("b1"), "¦~", "/"), "¤ë", ""), "~")(1))
On Error Resume Next
For i = 0 To DateDiff("m", d1, d2)
sn = Format(DateAdd("m", i, d1), "yyyy¦~m¤ë")
t = t + Sheets(sn).Cells(Sheets(sn).Cells(Sheets(sn).Rows.Count, 1).End(xlUp).Row, 2)
Next i
Sheets("·JÁ`").Range("B2") = t
End Sub |
|