ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting Unique Items with Multiple Criteria (https://www.excelbanter.com/excel-worksheet-functions/133157-re-counting-unique-items-multiple-criteria.html)

Ron Coderre

Counting Unique Items with Multiple Criteria
 
If you plan on extending the range and there may be blank rows...

Example:
TRIUMPH 2
TRIUMPH 3
TRIUMPH 3
ABC 2
ABC 5
DEF (blank)
(blank) (blank)
(blank) (blank)
(blank) (blank)

Try something like this:
If Col_A must be non-blank and Col_B must be numeric
=SUMPRODUCT((A2:A10<"")*ISNUMBER(B2:B10)/(COUNTIF(A2:A10,A2:A10&"")))

OR
If Col_A and Col_B must be non-blank
=SUMPRODUCT((A2:A10<"")*(B2:B10<"")/(COUNTIF(A2:A10,A2:A10&"")))

Does that help?
***********
Regards,
Ron

XL2002, WinXP


"Joe Gieder" wrote:

First thank you for your help.
I'm trying to count unique values based on criteria in another column.
What I'm trying to do is count vendors when they have a value associated
with them in another column. An example is:
A2 TRIUMPH B2 2
A3 TRIUMPH B3 3
A4 TRIUMPH B4 3
A5 ABC B5 2
A6 ABC B6 5
A7 DEF B7 blank (nothing entered)
result should be 2 because I don't want to count the blank cells.
Is there any way this can be done?
Thank you for your help
Joe



All times are GMT +1. The time now is 07:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com