Pivot Table usinq unique values

it's an excel world

Board Regular
Joined
Sep 17, 2008
Messages
126
I apologize in advance. I searched for this but couldn't find anything because I'm not too sure what I am looking for.

I have a spreadsheet with Dates running down column A and order numbers running down column B. There are multiples of the same order number corresponding to the same date.

I'd like a pivot table that would indicate each date from column A and the number of unique order numbers from column B.

Thanks in advance
 

Some videos you may like

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Fazza

MrExcel MVP
Joined
May 17, 2006
Messages
9,368
Hi.

Assuming the source data has a defined name, not dynamic, "MyData". This isn't necessary, but is easier to explain. Save the file.

From a new file start the pivot table wizard and take the external data option at the first step. Follow the wizard. At the last step take the option to edit in MS Query. See the dataset, hit the 'SQL' button and edit the text to become something like below,
Code:
SELECT DISTINCT YourColumnAHeader, YourColumnBHeader
FROM MyData
OK to enter the SQL, then hit the 'open door' icon to return the data and complete the pivot table. If you want, move the resultant worksheet into the source data file.

HTH, Fazza
 

Watch MrExcel Video

Forum statistics

Threads
1,122,193
Messages
5,594,767
Members
413,933
Latest member
Msar5586

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
Top