Hi all,
Maybe you can help with the following?
If I had a simple formula referencing another sheet, and I wanted VBA to fill it across I could use something like this (with different row values in each sheet).
My question is how would I go about referencing a change to the column rather than the row?
i.e. I need a way to add a set number of characters to the formula. so rather than referencing B2, then B6, then B10 as in the example above, I instead need to reference B2, F2, J2, N2.
Thanks in advance for any help.
Maybe you can help with the following?
If I had a simple formula referencing another sheet, and I wanted VBA to fill it across I could use something like this (with different row values in each sheet).
Code:
Public sub Test()
dim TPA as Integer
dim TPB as Integer
TPA = 1
TPB = 2
Do
Sheets("sheet1").cells (1, TPA).Formula = "=sheet2!B " & TPB & ""
TPA = TPA + 1
TPB = TPB + 4
Loop Until TPA = 50
End sub
My question is how would I go about referencing a change to the column rather than the row?
i.e. I need a way to add a set number of characters to the formula. so rather than referencing B2, then B6, then B10 as in the example above, I instead need to reference B2, F2, J2, N2.
Thanks in advance for any help.