• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Help - Copy conditionally from table/past to dashboard template/print to pdf/loop to next

BillinSC

New Member
Hello...I've made several attempts to write this code with no success; however, I am new and trying to teach myself VBA coding.

My goal is to create a loop that will copy/paste/export to pdf a report template for each employee of a region.

The way I envisioned this is via the following steps:
1) copy the "payroll id" field (column C of worksheet titled "Provider Listing") based on a conditional filter of the "region" field (Column B of Worksheet titled "Provider Listing".
2) paste the copied "payroll id" field into the "Report" worksheet cell B5.
3) export the resulting "Report" worksheet to pdf (with the unique "payroll id" listed in each resulting filename)
4) loop through the records for the selected region, doing the same steps 1-3 for each employee of the selected region.

If I could get help on any of these steps or the process as a whole, or advice on how to better accomplish the task, I'd be very grateful.

My sample file is too large, however, I've screenshot each worksheet for example.
Thank you in advance for any help or advice.

Provider Listing worksheet
74004

Report worksheet
74005
 
BillinSC
How could Your sample file be too large, if I could have those same data as You have sent with those two snapshots?
Could You do a new sample file ... a smaller one?
 
Back
Top