Is there a way to get relative line referances in a formula line that is to be enetered in a cell?
In the below line I would need to get the line numbers in E34 and D34 the same as the (lastrow + 1).
Bit more explanation - I'm entering a formula into a sheet with unknown rows, but the last 8 lines will always be the same (apart from the row number). The only thing that changes is the fixed cell per line - instead of $D$10 it would be $D$11 etc.
Alternatively I could try to copy all lines down with the first formula and then change the $D$10 into $D$11 with a function using 'replace' and 'right'
Appreciate your advise, thanks!
Regards, Rene
In the below line I would need to get the line numbers in E34 and D34 the same as the (lastrow + 1).
Code:
Range("F" & (lastrow + 1) [COLOR=#0000ff]& ":F"[/COLOR] & (lastrow + 3)).Formula = "=IF(E34=""Yes"",0,D34*$D$10)"
Bit more explanation - I'm entering a formula into a sheet with unknown rows, but the last 8 lines will always be the same (apart from the row number). The only thing that changes is the fixed cell per line - instead of $D$10 it would be $D$11 etc.
Alternatively I could try to copy all lines down with the first formula and then change the $D$10 into $D$11 with a function using 'replace' and 'right'
Appreciate your advise, thanks!
Regards, Rene