I am trying to have my spreadsheet automatically take the previous rows format and formulas when a new row is inserted.
I read where you can set up your sheet to automatically run the code if a change is made, but I am having a hard time getting the code to work.
I have tried the following and every time I insert a new row it keeps adding a row until it gets an error and I have to force quit:
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Range("A1:D25") = ActiveCell.EntireRow.Insert Then Cells(1, 2).Value = 10 End If End Sub
I added the
Cell Value = 10 to see if it would work. It was just a test, but it still fails.
Does anyone know a possible solution?