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 find last record in macro and delete all after

If it is the last record, then what is being deleted. If there is something
different from records, in the sheet, then how do you distinguish a record
from other data.

if the address of the last record is known (assume it is A132

lastRecordAddress = "A123"

Range(lastRecordAddress, "A65535").Offset(1,0).EntireRow.Delete

--
Regards,
Tom Ogilvy

"Sherife" wrote in message
...
How do I design a macro to find the last record in a report and delete
each
row after. Keeping in mind that the cell reference can change to where
the
last record is found??? Help please!!!