View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Insert Rows after text appears in column

Sub insert4()
dim lastrow as long, i as long
lastrow = cells(rows.count,1).End(xlup)
for i = lastrow to 1 step - 1
if cells(i,1).Value = "certain text" then
cells(i,1).offset(1,0).resize(4).Entirerow.Insert
end if
Next

End Sub


--
Regards,
Tom Ogilvy

"KENNY" wrote in message
...
I'd like to insert four rows after certain text appears in
a column.

Any ideas?

TIA