Thread: Insert a row
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Insert a row

Try this Rex

Sub test()
Dim Rng As Range
FindString = "Total"
Set Rng = Range("J:J").Find(What:=FindString, LookAt:=xlPart)
While Not (Rng Is Nothing)
Rng.EntireRow.Insert
Set Rng = Range("J" & Rng.Row + 1 & ":J" & Rows.Count) _
.Find(What:=FindString, LookAt:=xlPart)
Wend
End Sub


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Rex Dunlap" wrote in message ...
I have an Excel 2002 spreadsheet with subtotals.

Can someone show me how to add a row after each time that
the word 'xxx Total' appears?

The word 'Total' appears in Col J and the data area varies
from spreadsheet to spreadsheet. No spreadsheet goes
beyond row 700.

Help!