Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default COUNTIF or SUMPRODUCT with multiple criteria

I have a survey where Yes and No answers are signified by "1" or "0" in a
series of rows (each row corresponding to a different question in the survey)
and where race of respondent is indicated by "B" (for Black), "W" (White) or
"L" (for Latino" in one of the rows. I want to create a formula that counts
the number of occurrences of "1" in a range of cells in one row where "B" (or
W or L) occurs in a cell range in another row. In other words, where both
criteria are met--e.g. how many Black people answered Yes to a particular
question, how many white people answered No to a particular question, etc.

My inclination is to use COUNTIF but I am not clear if such a formula is
possible with multiple criteria. I have never used SUMPRODUCT, but I have
seen that recommended on these forums.

Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default COUNTIF or SUMPRODUCT with multiple criteria

As you have 1's and 0's in one column, you can use SUMIF as the answer
will be equivalent to counting. So, suppose your ethnicity code is in
column E and your answers are in column H - this will give you the
number of yes answers for Latinos:

=SUMIF(E:E,"L",H:H)

This will give you the number of no answers for Blacks:

=COUNTIF(E:E,"B") - SUMIF(E:E,"B",H:H)

(i.e. the total number of answers from Blacks minus the number of yes
answers for Blacks).

Perhaps you can see how to adapt this to your other requirements.
SUMIF and COUNTIF are much faster than SUMPRODUCT.

Hope this helps.

Pete

On Nov 25, 6:17*pm, ERICinLA77
wrote:
I have a survey where Yes and No answers are signified by "1" or "0" *in a
series of rows (each row corresponding to a different question in the survey)
and where race of respondent is indicated by "B" (for Black), "W" (White) or
"L" (for Latino" in one of the rows. I want to create a formula that counts
the number of occurrences of "1" in a range of cells in one row where "B" (or
W or L) occurs in a cell range in another row. In other words, where both
criteria are met--e.g. how many Black people answered Yes to a particular
question, how many white people answered No to a particular question, etc..

My inclination is to use COUNTIF but I am not clear if such a formula is
possible with multiple criteria. I have never used SUMPRODUCT, but I have
seen that *recommended on these forums.

Any ideas? *


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple criteria countif/sumproduct function Cobbcouk Excel Worksheet Functions 7 July 25th 06 12:22 PM
COUNTIF or SUMPRODUCT counting multiple criteria Kim Excel Worksheet Functions 1 June 1st 05 12:19 AM
COUNTIF or SUMPRODUCT counting multiple criteria Peo Sjoblom Excel Worksheet Functions 0 May 31st 05 11:40 PM
countif/sumproduct on multiple criteria Phil.M Excel Worksheet Functions 2 April 1st 05 06:48 AM
Using COUNTIF with 2 criteria - SUMPRODUCT? Mike R. Excel Worksheet Functions 2 February 24th 05 05:57 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"