0
votes

Trying to link cells from master sheet to others sheets using a macro. After using macro record i get;

ActiveCell.FormulaR1C1 = "=Total!R[3]C[3]"
ActiveCell.Offset(1, 0).Range("A1").Select

I want to increment the row in the Total sheet by 3 keeping the column the same. Any help to get me started would be great, thanks.

1

1 Answers

0
votes

Use something like this:

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