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

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Maybe something like this


[Table="class: grid"][tr][td="bgcolor: #DCE6F1"][/td][td="bgcolor: #DCE6F1"]
D
[/td][td="bgcolor: #DCE6F1"]
E
[/td][td="bgcolor: #DCE6F1"]
F
[/td][td="bgcolor: #DCE6F1"]
G
[/td][/tr]
[tr][td="bgcolor: #DCE6F1"]
1
[/td][td]
Customer​
[/td][td]
Status​
[/td][td][/td][td]
Result​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
2
[/td][td]
Albert​
[/td][td]
NO​
[/td][td][/td][td]
2​
[/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
3
[/td][td]
Albert​
[/td][td]
NO​
[/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
4
[/td][td]
Thomas​
[/td][td]
NO​
[/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
5
[/td][td]
Albert​
[/td][td]
YES​
[/td][td][/td][td][/td][/tr]

[tr][td="bgcolor: #DCE6F1"]
6
[/td][td]
Thomas​
[/td][td]
YES​
[/td][td][/td][td][/td][/tr]
[/table]


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,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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