Hi there,
Take a look at the attached workbook and see if it does what you need.
The code used for deleting outdated records is as follows:
The highlighted values may be altered to suit your own requirements.
Rows which contain entries older than 365 days will be automatically highlighted for deletion, and all such rows can be deleted by clicking on the "Delete Old Records" button.
Note that the text "To Be Deleted" (as displayed on the worksheet) is specified as the value of the workbook-level Defined Name "sDELETE". This Defined Name is used in Formulas, for Conditional Formatting, and also in the VBA Code. Specifying the text value in this way means that your own preferred text (e.g. "For Deletion", "Time-Expired" etc.) can be specified as the value of the Defined Name "sDELETE", and all Formulas, Conditional Formatting etc. will remain unaffected by the change.
Hope this helps - please let me know how you get on.
Regards,
Greg M
Bookmarks