Not sure if the title is the best description but if you're reading I appreciate the help!
I have this formula in my excel worksheet to auto number a cell only if anything exists in the cell two spaces over to the left.
=IF(A4<>"",COUNTA($A$4:A4)&".","")
In short, I don't need the numbering to start until row 4 and this formula looks to A4 if anything is entered. If something is there, then it begins counting. Works like a champ! The only problem is that if a row is added, the formula is not automatically input to the new row and the rest of the numbering is off. So this macro was created:
Sub Add_Row_and_Formula()
Dim insRows As Long
insRows = ActiveCell.Row
Selection.Insert Shift:=xlDown
Range("C" & insRows - 1).Select
Selection.AutoFill Destination:=Range _
("C" & insRows - 1, "C" & insRows), Type:=xlFillValues
Range("C" & insRows - 1, "C" & insRows).Select
Range("C" & insRows).Select
End Sub
Also works like a champ! So here's the new problem... I need the inverse of the macro now. In short, I need to be able to remove a row and have all the other rows with the formula automatically update and make the necessary corrections to the numbering. Am I asking too much of excel or is it possible to do this with another macro? Or is there an easier way to get the desired results then what I am doing? I also cannot take the credit for the formula and macro above, this forum is fantastic and I borrowed answers from other threads. So I'm very much a novice so please act like you're talking to a child with your response. You won't offend me and I'd greatly appreciate it!
Bookmarks