Count Unique Text based on criteria

tourless

Board Regular
Joined
Feb 8, 2007
Messages
144
Office Version
  1. 365
Platform
  1. Windows
Hi Folks.

Working with about 1000 rows of data, I have numeric values in column D not sorted but recurring at random intervals. Column A contains names. Those names can and will be repeated.

I'm looking for a way to say if the cell in column D is equal to 000415 then count the unique text values in column A. I've tried =COUNT('[My File 2022.xlsx]WE 05-28-22'!$D$6:$D$1500,"000415",'[My File 2022.xlsx]WE 05-28-22'!$A$6:$A$1500) and while it doesn't return an error, it also does not return the expected value either. In this instance I know my value should be 31, I'm returned with a value of 1. I also tried COUNTIF but I'm told it's too many parameters for the function.

Can someone help point me in the right direction? I'm not sure what I'm doing wrong.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
This may be easily accomplished with Power Query. Show us a sample of your data and your expected result for the sample presented. Please use XL2BB to show your sample data.
 
Upvote 0
How about
Excel Formula:
=ROWS(UNIQUE(FILTER('[My File 2022.xlsx]WE 05-28-22'!$A$6:$A$1500,'[My File 2022.xlsx]WE 05-28-22'!$D$6:$D$1500="000415")))
 
Upvote 0
Solution
How about
Excel Formula:
=ROWS(UNIQUE(FILTER('[My File 2022.xlsx]WE 05-28-22'!$A$6:$A$1500,'[My File 2022.xlsx]WE 05-28-22'!$D$6:$D$1500="000415")))
That's a nifty little formula right there. Thanks Fluff!
 
Upvote 0
This may be easily accomplished with Power Query. Show us a sample of your data and your expected result for the sample presented. Please use XL2BB to show your sample data.
Thanks for chiming in here Alan, Fluff got me sorted with a formula that works well for my need.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,705
Messages
6,173,986
Members
452,541
Latest member
haasro02

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