Hi Excel Guru's

I have a 5 page invoice workbook produced from a template, I can export as pdf and print the sheets but at the moment it exports the whole 5 pages.
Can I put in a macro that filters the workbook if say there is nothing in B15 on each sheet thay are omitted from the export?
Thanks