Counting two unique based on third column

creative999

Board Regular
Joined
Jul 7, 2021
Messages
114
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
Hi,
Any suggestions on a formula which would count unique values from columns A and B based on column E = Yes.

The count in the attached example should be:
Stationary = 2
Furniture = 1
 

Attachments

  • EXCEL.png
    EXCEL.png
    34 KB · Views: 8

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Why would Stationary count as 2 with columns A and B? Are you looking for each unique combination of A and B where E = Yes? Does column C come in to play at all?
 
Upvote 0
Why would Stationary count as 2 with columns A and B? Are you looking for each unique combination of A and B where E = Yes? Does column C come in to play at all?
Sorry, it should say:

'which would count unique values from columns A and C based on column E = Yes
 
Upvote 0
How about ?:

Libro1.xlsx
ABCDEFGH
1Stationaryinyes
2Stationaryinyes
3Stationaryoutyes
4Stationaryout
5Stationaryoutyes
6Stationaryout
7FurnitureABCyes
8FurnitureABCyes
9FurnitureABCyes
10FurnitureABCyes
11FurnitureABCyes
12
13Stationary2
14Furniture1
Sheet1
Cell Formulas
RangeFormula
H13:H14H13=IFERROR(COUNTA(UNIQUE(FILTER($C$1:$C$11,($E$1:$E$11="yes")*($A$1:$A$11=G13)))),0)
 
Upvote 0
Im trying to add another condition, but even when theres no match, im getting a value of 1.

=IFERROR(COUNTA(UNIQUE(FILTER($C$1:$C$11,($E$1:$E$11="yes")*($A$1:$A$11=G13)*($D$1:$D$11="YES")))),0)
 
Upvote 0
There was a problem.
I think this works correctly:
Libro1
ABCDEFGH
1Stationaryinyesyes
2Stationaryinyesyes
3Stationaryoutyesyes
4Stationaryout
5StationaryABCyesyes
6Stationaryghyesyes
7FurnitureABCyesyes
8FurnitureABCyesyes
9FurnitureGHyes
10FurnitureBDyesyes
11FurnitureABCyesyes
12
13Stationary4
14Furniture2
Hoja1
Cell Formulas
RangeFormula
H13:H14H13=LET( d,UNIQUE(FILTER($C$1:$C$11,($E$1:$E$11="yes")*($A$1:$A$11=G13)*($D$1:$D$11="yes"))), IF(ISERROR(SUM(d)),0,COUNTA(d)) )
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,206
Members
453,022
Latest member
RobertV1609

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