- ©«¤l
- 234
- ¥DÃD
- 19
- ºëµØ
- 0
- ¿n¤À
- 276
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows XP
- ³nÅ骩¥»
- office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-1-7
- ³Ì«áµn¿ý
- 2021-10-7
|
¦^´_ 3# mdr0465
§Aªº¹Ï¨Ò¬O§t¥Í²£¥ó¼Æ¤]¥[¤J,¦pªG¤£»Ý¥[¥Í²£¥ó¼Æ,½Ð±NActiveCell.FormulaR1C1 = "=SUM(RC[" & (3 - y) & "]:RC[-1])"
§ï¬°ActiveCell.FormulaR1C1 = "=SUM(RC[" & (4 - y) & "]:RC[-1])"
Sub ex()
Dim x, y
x = Range("a1").CurrentRegion.Rows.Count 'pºâ¨Ï¥Îªº¦C¼Æ
y = Range("a1").CurrentRegion.Columns.Count 'pºâ¨Ï¥ÎªºÄæ¼Æ
Cells(2, y).Select
ActiveCell.FormulaR1C1 = "=SUM(RC[" & (3 - y) & "]:RC[-1])" '¦Xp
Selection.AutoFill Destination:=Range(Cells(2, y), Cells(x, y)), Type:=xlFillDefault '±N¤½¦¡©ñ¤J©Ò¦³¦XpÄæ¦ì
End Sub |
|