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
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
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
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,684
Members
448,977
Latest member
dbonilla0331

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