Sub Add_Row_and_Formula()
Dim insRows As Long
insRows = ActiveCell.Row
Selection.Insert Shift:=xlDown
Range("B" & insRows - 1).Select
Selection.AutoFill Destination:=Range _
("B" & insRows - 1, "B" & insRows), Type:=xlFillValues
Range("B" & insRows - 1, "B" & insRows).Select
Range("B" & insRows).Select
End Sub
I edited some code I found to attempt it, but it's not great. Instead of referencing activecell.row, I want to insert the row before the Utilities line. I could always just set the active selection to the cell containing the string "Utilities" but I'm sure there's a better solution. This Macro copies the formula from the previous section, right? I need it to add 1 to the section # in the formulas, so probably using an i = i+1 kinda deal?
Bookmarks