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

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
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,214,998
Messages
6,122,639
Members
449,093
Latest member
Ahmad123098

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