- ©«¤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
|
¦^´_ 19# v03586
¸Õ¸Õ¬Ý¡G- Sub pºâ·í¤é¶}¾÷¼Æ()
- Dim RepSht As Worksheet, RepArr, xD1, xD2, R&, C&
- .
- .
- .
- ' ¦¹³B©I¥s
- GetSubTot
- Application.GoTo xSht.[A2]
- End Sub
½Æ»s¥N½X ¼W¥[³¡¤À¡G- Sub GetSubTot()
- Dim Btm As Long, rPos As Long
-
- With Sheets("¶}¾÷¼Æ")
- Btm = .Range("A" & Rows.Count).End(xlUp).Row
- rPos = Sheets("¶}¾÷¼Æ").UsedRange.End(xlToRight).Column
- If (Cells(1, rPos) = "Total") Then rPos = rPos - 1
- .Cells(1, rPos + 1) = "Total"
- .Cells(2, rPos + 1).Resize(Btm - 1).Formula = "=SUM(F" & 2 & ":T" & 2 & ")"
- .Cells(2, rPos + 1).Resize(Btm - 1) = .Cells(2, rPos + 1).Resize(Btm - 1).Value
- .Cells(Btm + 1, "B") = " Total"
- .Cells(Btm + 1, "F").Resize(, 16).Formula = "=SUM(F" & 2 & ":F" & Btm & ")"
- .Cells(Btm + 1, "F").Resize(, 16) = .Cells(Btm + 1, "F").Resize(, 16).Value
- End With
- End Sub
½Æ»s¥N½X |
|