Inserting 3 new rows after the word total

  • Thread starter Thread starter dd
  • Start date Start date
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.
 
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)
 
Thanks Bob, I'll test this next week.
I'm not sure how to change gmail to xxxx.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top