Countif but filter the number of customers...

albertc30

Well-known Member
Joined
May 7, 2012
Messages
1,091
Office Version
  1. 2019
Platform
  1. Windows
Hi all.

I am trying to filter the number of say invoices pending and the formula bellow does this.

=COUNTIF(E:E,"NO")

However, the goal here is to show only the number of customers with outstanding unpaid invoices.

These would be marked on say collumn E as NO.

So, say column D has customers and collumn E has YES or NO.

As an example,

D --------------- E

Albert ------- NO
Albert ------- NO
Thomas ----- NO
Albert ------- YES
Thomas ----- YES

The above would return 2 for the amount of customers with pending invoices.

I have tried the bellow but I'm at a loss here.

{=SUM(--(FREQUENCY(IF(criteria,MATCH(values,values,0)),ROW(values)-ROW(valuesfirstcell)+1)>0))}
Again and as always, many thanks for all of your time.

Cheers.
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Maybe something like this


D
E
F
G
1
Customer​
Status​
Result​
2
Albert​
NO​
2​
3
Albert​
NO​
4
Thomas​
NO​
5
Albert​
YES​
6
Thomas​
YES​

Array formula in G2
=SUM(IF(FREQUENCY(IF(TRIM(E$2:E$6)="NO",MATCH(D$2:D$6,D$2:D$6,0)),ROW(D$2:D$6)-ROW(D$2)+1),1))
Ctrl+Shift+Enter

M.
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,210
Members
448,554
Latest member
Gleisner2

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