Hi Abhi,
Your code might be something like
- check autofilter is on, with no filters in place. Maybe save initial settings
- filter one column for delay > range ("F4").value and one column for blank in "RV No"
- check if there are any rows visible, if not, reset autofilter to initial setting and exit sub
- for the list of items showing, create a list of the unique items. Suggest into an array, but you could copy & paste the visible cells to a temporary worksheet location and use the advanced filter. Or use a collection
- loop through these unique entries one at a time, and for each one set the autofilter on the "Depot/Units" field and print the report
- delete temporary range/s if used, reset file to initial set up
The macro recorder will help with some of the coding & syntax. Setting page setups can be very slow, so suggest you do that once at the beginning, or, if appropriate, set it outside VBA and have it correctly set all the time.
If you want any help on any details, please post the code you have.
regards,
Fazza