Is there a way to join two data sheets into one pivot?

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Well, what I do is give each data source a name. (If data will change either use a dynamic named range such as =OFFSET(some cell,,,COUNT(etc.etc) or udpating the range on worksheet deactivation such as
Code:
Range("A1").CurrentRegion.Name = "Data1"
)

And then join either by code or manually via MS Query - as in Data, import external data, new database query. Select both tables & the field/s you want, filter as required, and then either go straight to a pivot table or via MS Query to modify the SQL if required. Etc.

HTH
Fazza
 
Upvote 0
post script

Thought again of the SQL as I didn't explain much in the previous post.

If you want all the fields from both tables, then edit the SQL to something like

SELECT *
FROM path.workbook.first table
UNION ALL
SELECT *
FROM path.workbook.second table

Using this approach has the usual limitations of hard coded addresses in SQL. Suggest if this is a problem you create the SQL on the fly.

Running the pivot table wizard should let you select data from different sources, BTW, it is just that I tend to do this via SQL.

regards,
Fazza
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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