Hi,
My original intention with this macro was to "fill in" empty cells with a formula referencing the cell directly above it in the given range. The macro ended up replacing the data that was in all the cells (not just the blank cells) with the formula. Basically, I now have 400,000 rows of the same data.
This macro works with a smaller range, such as A2:G30. Is this not working because my range has so much data in it? Is there a better way to write this macro so it works for me?
Thanks,
Pete
Sub test()
'
Range("A2:G395992").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
Range("A1").Select
MsgBox ("Done!")
End Sub
My original intention with this macro was to "fill in" empty cells with a formula referencing the cell directly above it in the given range. The macro ended up replacing the data that was in all the cells (not just the blank cells) with the formula. Basically, I now have 400,000 rows of the same data.
This macro works with a smaller range, such as A2:G30. Is this not working because my range has so much data in it? Is there a better way to write this macro so it works for me?
Thanks,
Pete
Sub test()
'
Range("A2:G395992").Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
Range("A1").Select
MsgBox ("Done!")
End Sub