View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel[_493_] joel[_493_] is offline
external usenet poster
 
Posts: 1
Default delete all lines after finding criteria


You probably aren't finding anything . try this



set c = Columns(1).Find(what:="End Of Report", _
lookin:=xlvalues,lookat:=xlwhole)
if not c is nothing then
fr = c.row
lr = Cells(Rows.Count, "a").End(xlUp).Row
Rows(fr & ":" & lr).Delete
end if


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=167691

Microsoft Office Help