Counting Unique values in one column based on criteria in another

RodneyC

Active Member
Joined
Nov 4, 2021
Messages
278
Office Version
  1. 2016
Platform
  1. Windows
I'm musing this formula

=COUNTA(UNIQUE(Data4Adcel!D2:D344))

and it works fine but I need to add another criteria and can't seem to figure it out. I need it to only count the unique values in D where the values in R are greater than 0.

thanks in advance
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Try

Excel Formula:
=COUNTA(UNIQUE(FILTER(Data4Adcel!D2:D344,Data4Adcel!D2:D344>0)))
 
Upvote 0
I'm trying to add one more criteria now... count it only if the values in N2:N1000 contain the word Development. I've tried this

=COUNTA(UNIQUE(FILTER(Data4Adcel!$D$2:$D$1000,Data4Adcel!$R$2:$R$1000>0,Data4Adcel!N2:N1000,"*Development*"))) and get an error saying there are too many arguments.
 
Upvote 0
Excel Formula:
=COUNTA(UNIQUE(FILTER(Data4Adcel!D2:D1000,(Data4Adcel!R2:R1000>0)*(ISNUMBER(SEARCH("Development",Data4Adcel!N2:N1000))))))
 
Upvote 0
I would use Rows rather than counta, as counta will return 1 even if there are no matches
Excel Formula:
=IFERROR(ROWS(UNIQUE(FILTER(Data4Adcel!D2:D1000,(Data4Adcel!R2:R1000>0)*(ISNUMBER(SEARCH("Development",Data4Adcel!N2:N1000)))))),0)
 
Upvote 0

Forum statistics

Threads
1,214,985
Messages
6,122,606
Members
449,089
Latest member
Motoracer88

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