Formula to count values with unique values and different criteria

Graham C1600

Board Regular
Joined
Feb 17, 2018
Messages
96
Office Version
  1. 365
a
b
c
d
e
f
123
John
Smith
01/01/2019
5/04/2019
No
12345
Simon
Taylor
01/01/019
03/12/2018
No
43433
June
Brown
01/01/2019
03/01/2019
Yes
234
Paul
Baker
01/01/2019
No
12345
Rij
Veech
01/01/2019
03/03/019
No

<tbody>
</tbody>

In Cell H1 I need a formula look down column F and ensure it looks for "No", then to look down column E3:E7 and where there is data, count column A3:A7. But I only need unique values. So in this case it would be 2.
In Cell H2 I need a formula look down column F and ensure is looks for "No", then to look down column E3:E7 and where there are blanks, count column A3:A7. But I only need unique values. So in this case it would be 1.
In Cell H3 I need to count all the cells in E3:E7 that contain data and column F also contains "No". This would be 3.
In Cell H4 I need to count all the cells in E3:E7 that are blank and column F also contains "No". This would be 1

Hope this makes sense.

Thanks in advance.
 
Try

Array formula
=SUM(IF(FREQUENCY(IF(B2:B20<>"",IF(C2:C20="NO",MATCH(A2:A20,A2:A20,0))),ROW(A2:A20)-ROW(A2)+1),1))
confirmed with Ctrl+Shift+Enter, not just Enter

M.
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,215,772
Messages
6,126,806
Members
449,337
Latest member
BBV123

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