Forum Discussion
Printing based on Cell value - VBA???
Hi, Justin_L .
Here's a quick solution for you. It could still use a few tweaks to the design and practical aspects, but it is doing what you need. Just hit the "staff sheets" button.
Below you can read a summary of the steps that I took:
- Transformed data into an Excel table.
- created a list of unique staff names and put it into a table.
- Tables allow you to add more data to it without the need to update formulas or VBA code to account for the new data range (if they were properly set up).
- To obtain the desired results, make sure that the same staff member is always spelled the same way. (Data validation with a dropdown menu is in place in the last column of the data table.)
- set columns A to D as Print Area
- Set printing scale as fit all columns into one page
- created a macro that goes through the staff list and, for each name filters the data table by that name and then creates a PDF printing of the visible rows. PDF files are saved in the same folder as the Excel file. At the end of the process, the table filters are cleared.
I hope this helps and I wish you and your team lots of fantastic reviews.
Cheers!
Celia Alves
That worked just perfectly for what I need.... the next question is HOW you got there so I can import it into the ACTUAL report! I run this report anywhere from once a quarter to once a month, and so I will need to repeat this with some regularity! And I will want to make sure it will translate to a new report each time.
I appreciate it though! It works great! Thank you so much! You just saved me HOURS, literally!