Vba Excel宏-在工作表之间链接单元格
尝试使用宏将单元格从主工作表链接到其他工作表。使用宏记录后我得到Vba Excel宏-在工作表之间链接单元格,vba,excel,Vba,Excel,尝试使用宏将单元格从主工作表链接到其他工作表。使用宏记录后我得到 ActiveCell.FormulaR1C1 = "=Total!R[3]C[3]" ActiveCell.Offset(1, 0).Range("A1").Select 我想将总计工作表中的行增加3,使列保持不变。如果能帮我开始,那就太好了,谢谢 使用类似以下内容: Dim i As Long Dim cell As Range Set cell = ActiveCell For i = 3 To 30 Step 3 '
ActiveCell.FormulaR1C1 = "=Total!R[3]C[3]"
ActiveCell.Offset(1, 0).Range("A1").Select
我想将总计工作表中的行增加3,使列保持不变。如果能帮我开始,那就太好了,谢谢 使用类似以下内容:
Dim i As Long
Dim cell As Range
Set cell = ActiveCell
For i = 3 To 30 Step 3 ' change 300 to the relevant max num for you
cell.FormulaR1C1 = "=Total!R[" & i & "]C[3]" ' you'll need to change/test this
Set cell = cell.Offset(1, 0)
Next i