View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Find last row and delete from +1 to end

Dim NextRow as long
with activesheet
Nextrow = .cells(.rows.count,"A").end(xlup).row + 1
.rows(nextrow & ":" & .rows.count).delete
end with

Darin Kramer wrote:

Hi all,

Im sure ive done this before, but cant get it to work now!

I want to using column A as the data source find the last piece of data,
and then delete from the next row (Ie keeping the last piece of data) to
the last row(65536)

eg if last piece of data is in A156, Macro needs to delete from
157:65536

Thanks

D

*** Sent via Developersdex http://www.developersdex.com ***


--

Dave Peterson