Enter array formula in C2 and copy down
**Must be entered with Ctrl+Shift+Enter key combination.
Formula:
=IFERROR(INDEX($A$2:$A$10,MATCH(0,IF($B$2:$B$10=0,COUNTIF(C$1:$C1,$A$2:$A$10)),0)),"")&""
v |
A |
B |
C |
1 |
CUSTOMER |
INVOICE AMOUNT |
|
2 |
Smith0123 |
0 |
Smith0123 |
3 |
Cooper0123 |
123 |
Cooper0123 |
4 |
White0123 |
165 |
Osbourne0123 |
5 |
Cooper0123 |
0 |
|
6 |
Osbourne0123 |
651 |
|
7 |
Smith0123 |
0 |
|
8 |
Osbourne0123 |
0 |
|
9 |
Smith0123 |
9 |
|
10 |
White0123 |
58169 |
|
If you need to count unique records with criteria in Column B =0 use this formula
Formula:
=SUMPRODUCT((B$2:B$10=0)/COUNTIFS(A$2:A$10,A$2:A$10,B$2:B$10,B$2:B$10&""))
This will give you the result of 3
Bookmarks