Hey everybody,
I have a large database in excel. Sometimes I will add rows to this database.
I want to reduce my manual labour by making a vba code that will automatically copy the formula of the cell above the newly created empty cells into the new cells. So for instance if cell B1 has the formula "=A1" and I create a new second row, I want that the formula in newly created cell B2 becomes: "=A2"
What I made is the following:
Sub refresh()
Range("BS65536").End(xlUp).Select
Range("BP3", ActiveCell).Select
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.FormulaR1C1 = "=R[-1]C"
End Sub
My problem now is that, continuing on my example, the cell B2 will have the formula "=B1" instead of "=A2", anyone one knows how to fix this?
Thanks for your help!
Jeroen
Bookmarks