VBA to loop through a data input tab to populate contracts

bbalch

Board Regular
Joined
Feb 23, 2015
Messages
61
Hello everyone.

I wanted to see if anyone could create some VBA or suggest a better way of doing process that we are currently doing manually. An example file is saved to the Dropbox link below.

We hire temporary labor for different events and our departments submit a temporary hire spreadsheet that gathers and lists all of their hires information. This is the Data_Submitted tab in the Dropbox file.Some departments will hire up to 100 people per event. For each temporary hire we are required to fill out a contract, eg “Template” tab in the dropbox link. This is currently a manually process that I’m hoping to automate.

Ideally I would like to loop through the Data_Submitted tab and populate the template tab with each row’s data and create a new tab with that information. For example of the Data_Submitted tab row 2 is John Smith, so a contract for John Smith would be created with his information, then the data in row 3 would populate a new contract….to the last row of data.

Things I’m looking to accomplish:
1. Create a contract for each row of data on the Data_Submitted tab by populating fields on the Template tab
a. Populate Name
b. Populate Address
c. Populate Title
d. Populate City
e. Populate State / Zip
f. Populate Phone
g. Populate email
2. Create a separate tab for each new contract
3. Rename the tab to the contents of Cell G2 (LastName_FirstName_Event)
4. Save all tabs with the tabs name (G2) above as PDF

The number of rows on the Data_Submitted tab will vary based on each departments needs and will range from 3 – 100 rows.


Any suggestions on a way to improve this or VBA to accomplish this are greatly appreciated.

https://www.dropbox.com/sh/x240qlvgj2hd8f1/AABk_s_DTsI22t3zPS1m7L00a?dl=0

Thanks,
Ben
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,214,386
Messages
6,119,214
Members
448,874
Latest member
b1step2far

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top