If the user inserts a row, I want all formatting/formulas/data validation from the row above to be inherited in the newly inserted row. I want this to occur on sheet1.
When you insert a new row, although the entire new row is selected, the active cell is the cell in column A. So I figured I could base a routine off of the active cell. Here is what I tried:
Private Sub insertRow( )
Range(ActiveCell.Offset(-1, 0), ActiveCell.Offset(-1, 0).End(xlToRight).Offset(1, 0)).Filldown
End Sub
I am trying to reference a range. The first cell in the range is above the active cell. The second cell in the Range is above, the active cell, then to the right of the range, then down one. By referring to this Range, I am then trying to use the FillDown method. This code isn't doing anything.
Any suggestions would be appreciated.
Also, I need Excel to automatically run this code when the user inserts a new cell on sheet1. Would I need an event handler or just put this code inside of the Sheet1 code window?
Bookmarks