R
Rachel Jones
I am trying to write a macro which will enter a formula into a cell on
the fourth row of a spreadsheet, then copy it down the column -
allowing for the fact that there may be a groups of 2 empty rows at
periods.
My VBA knowledge is poor - I have got the formula copying OK (until it
hits the first empty row) like this:
Range("L4").Select
ActiveCell.FormulaR1C1 = "=RC[-2]+RC[-1]"
Set rng = Range(ActiveCell.Offset(0, -1), ActiveCell.Offset(0,
-1).End(xlDown))
Set rng = rng.Offset(0, 1)
rng.Formula = ActiveCell.Formula
but am unsure how to proceed from here.
Any help would be appreciated
Rachel
the fourth row of a spreadsheet, then copy it down the column -
allowing for the fact that there may be a groups of 2 empty rows at
periods.
My VBA knowledge is poor - I have got the formula copying OK (until it
hits the first empty row) like this:
Range("L4").Select
ActiveCell.FormulaR1C1 = "=RC[-2]+RC[-1]"
Set rng = Range(ActiveCell.Offset(0, -1), ActiveCell.Offset(0,
-1).End(xlDown))
Set rng = rng.Offset(0, 1)
rng.Formula = ActiveCell.Formula
but am unsure how to proceed from here.
Any help would be appreciated
Rachel