I'm trying to copy formulas with relative row and column names.
I have base column with 10 formulas and I'm trying to copy formula 5 times on columns on the right.
So for example in base column i have this formula =A1+B1 and i want to make next cell this =B1+C1 next =C1+D1 and so on.
I have this code
For i = 1 To Range("B1").Value
For j = 1 To 10
Sheet2.Cells(5 + j, 2 + i).FormulaR1C1 = "=c[-1]"
Next j
Next i
But this just copies value from left cell
It would be easy if the formulas were same but they are different. So im trying to find a way to dynamically reference always left cell.
This is one of the real formulas
='Balance sheet'!B13*360/'P&L'!B2
I want next cell to be
='Balance sheet'!C13*360/'P&L'!C2
And with code i have now next cell is =B3
=A1+B1,=B1+C1and=C1+D1are entered in three adjacent horizontal cells, it is the same formula as far as Excel is concerned (it looks the same in the R1C1 notation). Please give more details about your sheet layout. - GSerg"=r[0]c[-1] + r[0]c[0]"- Scott Craner='Balance sheet'!B13*360/'P&L'!B2and='Balance sheet'!C13*360/'P&L'!C2is the same formula if they are in horizontally adjacent cells @housefrommars. To copy this formula to the right you assignNewCell.FormulaR1C1 = OldCell.FormulaR1C1. - GSerg