ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Count If formula question (https://www.excelbanter.com/excel-discussion-misc-queries/136394-re-count-if-formula-question.html)

T.Valko

Count If formula question
 
Try this:

=SUMPRODUCT(--(A1:A1001000),--(B1:B100="California"))

Better to use cells to hold the criteria:

C1 = 1000
D1 = California

=SUMPRODUCT(--(A1:A100C1),--(B1:B100=D1))

Biff

"UNCCNU" wrote:

I have no problem with the standard CountIF function. What I can't figure
out is how to count based on 2 variables. For example, I would like to count
the # of companies that have 1 of 10 options in column A... AND 1 of 5
options in column B. For example, I can use simple CountIf to figure out
there are 100 companies earning over $1,000. I want to then break down that
100 companies into 5 categories... such as how many of the 100 are in
California. The states are my column B in the example above. Can anyone
help with creating a CountIF function that essentally has an "And" involved
also? Thank you very much.



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

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