Inserting 3 new rows after the word total

D

dd

Hi, I'm working with multiple rows of data, probably around 3000 rows
and I have the word "total" in between the data in Column A in Excel. I
want to add three blank rows after the word Total. The word Total is
also in bold font, so I tried selecting it with ASAP utilities and add
it but it didn't work. Can someone please help with a macro? Thanks.
 
B

Bob Phillips

Application.ScreenUpdating = false
iLastRow = Cells(Rows.Count, "A").End(xlUp).Row
For i = iLastRow To 1 Step -1
If Cells(i, "A").Value = "Total" Then
Rows(i + 1).Resize(3).Insert
End If
Next i
Application.ScreenUpdating = True

--
---
HTH

Bob

(change the xxxx to gmail if mailing direct)
 
Top