find last record in macro and delete all after
Thanks for being so quick! I have to add information to an invoice so with
each invoice the last record changes and that's why I need it to find the
last record and then delete the added information after that. I add the
extra information to several cells in a column so that if more records come
in month to month that information flows down the page far enough to match
each additional record
"Tom Ogilvy" wrote:
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!!!
|