VBA Code to Create New Worksheet from Existing Template, Populate new WS from Existing WS Template

dcoker

New Member
Joined
Dec 13, 2018
Messages
36
This is my first post, so bear with me.

I have a data WS "Timesheet" that is an employee time sheet using each row as a date. I need to create a new billing invoice WS based off of an existing invoice template "Invoice" and label it as the PO Number with the following:

1) Label the new billing invoice WS from the PO number in "Timesheets" range "F7" (The first row of the table).
2) Search Column F for any additional dates with the same value from Column F and compile into the same new billing invoice WS, until the last row of the table is reached.
3) If the next row has a new PO, (Column F again), generate a new billing invoice, if the PO has already been generated, skip this row.

While creating the new Invoice WS's, I need each Invoice to contain data from the "Timesheet" WS that corresponds with each PO row.
Example:

Timesheet Column F value = new billing invoice cell "R3".
Timesheet Column H value = new billing invoice cell "D5".

Each date appears on the invoice as well, and the time from the timesheet would need to correspond with the time for each date on the billing invoice.


I have attached JPG's of a blank Timesheet WS and blank billing invoice WS.

I hope this makes sense.

Thanks for the help.

https://www.dropbox.com/s/qez87krjzh...ample.JPG?dl=0


https://www.dropbox.com/s/ojbqqylxaf...ample.JPG?dl=0
 
Last edited by a moderator:

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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