Finding a VBA code to extract between two worksheets

shahid5788

Board Regular
Joined
May 24, 2016
Messages
91
Hi, I have my Pivot Table data shown below. I am trying to find a VBA code or macro in order to streamline my current process. Currently below you will see my "Upload Template" which is a different worksheet. I currently have my "Pivot Table" tab and trying to get that information into my "Upload Template" tab. Is there some sort of VBA code that can help with this process. Because I do have alot of information that I currently have to manually input for each Employee ID. Can anyone please assist?





PIVOT TABLE WORKSHEET


[TABLE="width: 571"]
<colgroup><col><col><col><col></colgroup><tbody>[TR]
[TD]Sum of Hours[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Employee ID[/TD]
[TD]Project[/TD]
[TD]Dept ID[/TD]
[TD]Total[/TD]
[/TR]
[TR]
[TD]12345678[/TD]
[TD]147-258-369-CT[/TD]
[TD]130[/TD]
[TD]11[/TD]
[/TR]
[TR]
[TD]12345678[/TD]
[TD]654-847-631-CT[/TD]
[TD]130[/TD]
[TD]15[/TD]
[/TR]
[TR]
[TD]41112478[/TD]
[TD]PAT-476-000-CT[/TD]
[TD]417[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]85471452[/TD]
[TD]451-02-1475-CT[/TD]
[TD]380[/TD]
[TD]11[/TD]
[/TR]
[TR]
[TD]85471452[/TD]
[TD]647-01-1747-CT[/TD]
[TD]380[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]85471452[/TD]
[TD]801-02-1416-CT[/TD]
[TD]380[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]85471452[/TD]
[TD]PAT-147-004-CT[/TD]
[TD]380[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]85471452[/TD]
[TD]PAT-321-004-CT[/TD]
[TD]380[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]85471452[/TD]
[TD]PAT-418-004-CT[/TD]
[TD]380[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]98741258[/TD]
[TD]357-417-000-CT[/TD]
[TD]471[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]98741258[/TD]
[TD]364-871-000-CT[/TD]
[TD]471[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD]98741258[/TD]
[TD]628-000-417-CT[/TD]
[TD]471[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]98742351[/TD]
[TD]657-00-7941-CT[/TD]
[TD]817[/TD]
[TD]26[/TD]
[/TR]
[TR]
[TD]98742351[/TD]
[TD]919-07-147-CT[/TD]
[TD]817[/TD]
[TD]32[/TD]
[/TR]
[TR]
[TD]98742351[/TD]
[TD]PAT-418-004-CT[/TD]
[TD]817[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]98742351[/TD]
[TD]PAT-654-001-CT[/TD]
[TD]817[/TD]
[TD]1[/TD]
[/TR]
</tbody>[/TABLE]









UPLOAD TEMPLATE WORKSHEET

[TABLE="width: 3847"]
<colgroup><col span="14"><col><col><col span="5"></colgroup><tbody>[TR]
[TD]IMPORT[/TD]
[TD]EMPLOYEE_ID[/TD]
[TD]BEGIN_DATE[/TD]
[TD]DESCRIPTION[/TD]
[TD]STATE[/TD]
[TD]PROJECT_ID[/TD]
[TD]TASK_NAME[/TD]
[TD]CUSTOMER_ID[/TD]
[TD]ITEM_ID[/TD]
[TD]TIME_TYPE[/TD]
[TD]BILLABLE[/TD]
[TD]BILLED[/TD]
[TD]DEPARTMENT_ID[/TD]
[TD]LOCATION_ID[/TD]
[TD]TIMESHEETENTRY_DATE[/TD]
[TD]TIMESHEETENTRY_HOURS[/TD]
[TD]TIMESHEETENTRY_DESCRIPTION[/TD]
[TD]TIMESHEETENTRY_NOTES[/TD]
[TD]TIMESHEETENTRY_PROJECTID[/TD]
[TD]TIMESHEETENTRY_VENDORID[/TD]
[TD]TIMESHEETENTRY_CLASSID[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]12345678[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]147-258-369-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]130[/TD]
[TD][/TD]
[TD][/TD]
[TD]11[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]654-847-631-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]130[/TD]
[TD][/TD]
[TD][/TD]
[TD]15[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]85471452[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]451-02-1475-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]380[/TD]
[TD][/TD]
[TD][/TD]
[TD]11[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]PAT-321-004-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]380[/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]PAT-418-004-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]380[/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]PAT-147-004-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]380[/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]801-02-1416-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]380[/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]647-01-1747-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]380[/TD]
[TD][/TD]
[TD][/TD]
[TD]2[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]41112478[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]PAT-476-000-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]417[/TD]
[TD][/TD]
[TD][/TD]
[TD]10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]98741258[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]357-417-000-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]471[/TD]
[TD][/TD]
[TD][/TD]
[TD]10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]628-000-417-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]471[/TD]
[TD][/TD]
[TD][/TD]
[TD]10[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]364-871-000-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]471[/TD]
[TD][/TD]
[TD][/TD]
[TD]7[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]98742351[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]919-07-147-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]817[/TD]
[TD][/TD]
[TD][/TD]
[TD]32[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]657-00-7941-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]817[/TD]
[TD][/TD]
[TD][/TD]
[TD]26[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]PAT-654-001-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]817[/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]PAT-418-004-CT[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]817[/TD]
[TD][/TD]
[TD][/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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