Pivot Table - Non-Contiguous Range

TreeDude

New Member
Joined
Oct 1, 2021
Messages
7
Office Version
  1. 365
Platform
  1. Windows
I just wanted to share a trick I "discovered" for creating a pivot table from a non-contiguous range. I have reports I run weekly from our company financial system to show Purchase Order (PO) Details; one report per active project (unfortunately). I have a macro that formats, replaces static totals w/ formulas, etc., then it adds a pivot table. It works great ... except for stores that have POs in more than one currency (typically USD and CAD). Those reports come across with a subtotal for the first currency (CAD) in the middle, disturbing the continuity of the pivot table range.

I searched and searched for "create pivot table from non-contiguous range". The only answer I found was NO. So something inspired me to add a new sheet (tab). I named the CAD range (w/ headings) and the USD range (w/o headings) on the original sheet. Then I just put =CAD in cell A2 of the new sheet and it fills that sheet with a "replica" of the CAD range. Then I put =USD in the cell directly below the CAD range on the new sheet. Presto, a "mirror" of the original table, but without the CAD subtotal so it is now contiguous and I create a pivot table from that. Last step after configuring and formatting the pivot table is to hide the "mirror" sheet so it looks to other users like the pivot table is from the original sheet.

I imagine this can also be done with non-contiguous columns, as long as the structure of the data is compatible and when you put them together on the new sheet, you get something that looks like a table and constitutes a contiguous range.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.

Forum statistics

Threads
1,215,500
Messages
6,125,166
Members
449,210
Latest member
grifaz

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