Conditional Summing (Sumif? Countif?)

K

klam

I would like to count the occurances IF a certain condition is met.

Specifically, there are small, medium and large companies and I want to be
able to count the number of "Yes" responses to a question (say Q1), but only
for the Small companies, then only for the Medium, then only for the large.

Size Q1
Small Yes
Med Yes
Large No

I have tried different versions of Countif and IF but can't get it right.
Seems like it should be simple but it's got me stumped!

Using Excel 2000 on XP. Tia!

cheers,
klam
 
A

Aladin Akyurek

One of:

(a) Construct a pivot table.

(b) Invoke a formula like:

=SUMPRODUCT(--(SizeRange=Size),--(QuestionRange="Yes"))
I would like to count the occurances IF a certain condition is met.

Specifically, there are small, medium and large companies and I want to be
able to count the number of "Yes" responses to a question (say Q1), but only
for the Small companies, then only for the Medium, then only for the large.

Size Q1
Small Yes
Med Yes
Large No

I have tried different versions of Countif and IF but can't get it right.
Seems like it should be simple but it's got me stumped!

Using Excel 2000 on XP. Tia!

cheers,
klam

--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.
 
K

klam

Aladin,

Thx a mint! The formula worked like a charm...and greatly appreciated.
(This is part of a larger spreadsheet/project so I didn't use the Pivot
Table.)

I will read up on SUMPRODUCT for my knowledge.

cheers,
klam

Aladin Akyurek said:
One of:

(a) Construct a pivot table.

(b) Invoke a formula like:

=SUMPRODUCT(--(SizeRange=Size),--(QuestionRange="Yes"))
I would like to count the occurances IF a certain condition is met.

Specifically, there are small, medium and large companies and I want to be
able to count the number of "Yes" responses to a question (say Q1), but only
for the Small companies, then only for the Medium, then only for the large.

Size Q1
Small Yes
Med Yes
Large No

I have tried different versions of Countif and IF but can't get it right.
Seems like it should be simple but it's got me stumped!

Using Excel 2000 on XP. Tia!

cheers,
klam

--

[1] The SumProduct function should implicitly coerce the truth values to
their Excel numeric equivalents.
[2] The lookup functions should have an optional argument for the return
value, defaulting to #N/A in its absence.
 
Top