Count PO's per Supplier

jlp

New Member
Joined
Feb 14, 2024
Messages
27
Office Version
  1. 365
Platform
  1. Windows
I know this has been asked a number of ways and I feel I have got myself so convoluted with so much information I cannot make heads or tails out of how I need to write this formula

I have a spreadsheet
Suppl NamePO
Supplier A41058
Supplier A41099
Supplier A41099
Supplier A41166
Supplier A41271
Supplier B41059
Supplier B41059
Supplier C41052
Supplier D41136
Supplier E41157
Supplier E41168
Supplier F41139

I want the number of unique PO's per Supplier, such as:
Supplier A 4
Supplier B 1

For the life of me I cannot figure out how to do this.

Please help!
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Excel Formula:
=LET(a,CHOOSECOLS(UNIQUE($A$2:$B$13),1),COUNTA(FILTER(a,a=$E2)))

Where E2 is the name of the supplier
 
Upvote 0
I appreciate the formula but I don't understand it :unsure:

What is "LET" and "CHOOSECOLS"? Is E2 supposed to be the number of PO's?

Sorry for my confusion - as I said, "I've been looking at this all day!"
 
Upvote 0
Let lets you assign a value to a variable that can be used later in the formula. In this case a =
Excel Formula:
CHOOSECOLS(UNIQUE($A$2:$B$13),1)

Unique takes the unique records of Suppl Name and PO, getting rid of duplicate records. Choose columns takes only the first column of that array.

You then filter it to get the list with only the name of the supplier. For example, E2 could equal Supplier A. CountA counts the number of values in that Array
 
Upvote 0
Let lets you assign a value to a variable that can be used later in the formula. In this case a =
Excel Formula:
CHOOSECOLS(UNIQUE($A$2:$B$13),1)

Unique takes the unique records of Suppl Name and PO, getting rid of duplicate records. Choose columns takes only the first column of that array.

You then filter it to get the list with only the name of the supplier. For example, E2 could equal Supplier A. CountA counts the number of values in that Array
,
 
Upvote 0
When I copy that formula into my spreadsheet I receive "0" in Col E2 - shouldn't it return a value of 4, for 4 PO's made for Supplier A?
 
Upvote 0
MountainFog's solution seems to work for me on your data:

1707943518075.png


If you are getting zero, it probably means that you are referencing the wrong cell(s) in your formula, or your values in column A don't exactly match what is in cell E2.
They must match EXACTLY. Something as simple as an extra space will cause it not to match. I copied your value from cell A2 to cell E2 to make sure it matches exactly.
 
Upvote 0
Ugh...I get what you're saying but now I'm getting a "1".

Is this an Array formula requiring Cntl+Alt+Enter?
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

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