ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Count based on criteria (https://www.excelbanter.com/excel-discussion-misc-queries/170458-count-based-criteria.html)

ba374

Count based on criteria
 
I have a row for which I need to count last names to have a total for each
last name.

Does anyone have any suggestions?

Thanks for your help!

Bob Phillips

Count based on criteria
 
=SUM(IF(LEN(A1:A10)-LEN(SUBSTITUTE(A1:A10,"
",""))0,IF(MID(A1:A10,FIND("~",SUBSTITUTE(A1:A10, "
","~",LEN(A1:A10)-LEN(SUBSTITUTE(A1:A10," ",""))))+1,99)="Phillips",1,0)))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"ba374" wrote in message
...
I have a row for which I need to count last names to have a total for each
last name.

Does anyone have any suggestions?

Thanks for your help!





All times are GMT +1. The time now is 03:26 PM.

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