Hi Korrinna
This should work. You will need to change the text to look for ("Head*") to something that will match your headings. You may also need to change the column to look in.
Sub tryThis()
Dim Found As Range
Dim StopCell As Range
With Columns(1)
Set Found = Range("A1")
Set StopCell = .Find(What:="Head*", _
After:=.Cells(65536, 1), SearchDirection:=xlPrevious)
Do Until Found = StopCell
Set Found = .Find(What:="Head*", _
After:=Found.Offset(2, 0), SearchDirection:=xlNext)
Found.EntireRow.Insert
Loop
End With
End Sub
Hope it helps
OzGrid Business Applications
Thank you Dave but something not right
Do Until Found = StopCell Set Found = .Find(What:="Head*", _ After:=Found.Offset(2, 0), SearchDirection:=xlNext) Found.EntireRow.Insert Loop
Thanks Dave...when I tried the procedure it kept looping as it added row after row between found header rows until I stopped it manually. Also it added rows between the last row of the found header and the second-to-last row of that same header, instead of between differing header names. But you helped put me on the right track and I'll keep experimenting and hopefully will solve this. Thanks again. Korrinna.
Re: Thank you Dave but something not right
Do Until Found = StopCell Set Found = .Find(What:="Head*", _ After:=Found.Offset(2, 0), SearchDirection:=xlNext) Found.EntireRow.Insert Loop
Hi Korrinna
Here's what I did.
In Column A I put "Head1" then in the next 5 rows beneath that I put some other text and numbers. below that i put "Head2" followed by another 5 o 6 rows of data. I did this for about 50 rows.
Hopefully this may help you, if not let me know.
OzGrid Business Applications