Combining Two Pivot Tables (or Data Tables) into One Pivot Table

screech

Active Member
Joined
May 27, 2004
Messages
296
I have been searching all over for most of the day on the best way to do this, but I am stumped.

I have a worksheet of data in the workbook. It contains fields for "Project", "Month", "Drawings", and a bunch of other columns. I made a single pivot table from this worksheet that will count the number of drawings per project and month.
I have a second worksheet of data in the workbook. It contains fields for "Project", "Code", "Month", "Hours", and a bunch of other columns. I made a single pivot table from this worksheet that will sum the number of hours per project per month per code.
The data are unique between the two worksheets except for the common "Project" and "Month". Sometimes there are no drawings and some hours in a month, and sometimes there are no hours but drawings in a month.

What I really want is one pivot table that includes the "Project", "Month", "Drawings", and "Hours". I thought it would be easy to create a pivot table based on two other pivot tables (Drawings and Hours) or a single pivot table from data in two different worksheets... but I have been unsuccessful in doing this. I am trying not to edit the source data in the worksheets because this data is regularly updated over time and I don't want to recreate columns or formulas each time. I've even tried to make up a SQL data connection in VBA to do this. Can anyone please help?
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Which version of MS Office are you using as you could use PowerPivot to join the 2 tables or if necessary consider moving the data to Access and you can use a Query to do the same thing then maybe export the results back to Excel if you want it back in Excel.
 
Upvote 0
I am using Excel 2010. I would really like to keep the data in the same sheet as the pivot table, and to have it on two different sheets. Is there any way to make a SQL command that will perform database query on tables in the same Excel workbook in order to combine the tables?
 
Upvote 0

Forum statistics

Threads
1,217,414
Messages
6,136,492
Members
450,016
Latest member
murarj

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