Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 47
Default sum items in a column based on criteria located in other columns

I'm using Excel to maintain records for participants in a multisite clinical
trial of therapy groups. I'd like to use a function that filters records
according to specific criteria so that I get a count of the records meeting
these criteria. I have a column in which I have recorded the research site
(Site A=1, Site B=2). Another column records the experimental condition to
which participants have been assigned (Control=0, Treatment=1). Therapy
group has been recorded in another column (Group 1=1, Group 2=2, etc.).
Here's and example of what the data looks like:

ID Site Condition Group
1 1 1 1
2 1 1 1
3 1 0 1
4 1 1 1
5 2 0 1
6 2 0 1
7 2 1 1
8 2 0 1

A table I could create to provide a breakdown of the number of participants
at each site in each group in each therapy group would look something like
this:

Site A
Group 1
Treatment 3
Control 1

Site B
Group 1
Treatment 1
Control 3

Certainly, a "COUNTIF" function could be used to provide a total number of
cells having the value of "0" and the total number of cells having the value
"1", but I'd like to be able to create a complex function based on multiple
criteria so I can produce a table like that depicted above.

Thanks in advance for any assistace provided.

Kurt
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default sum items in a column based on criteria located in other columns

Use SUMPRODUCT of the form:

=SUMPRODUCT(--(A1:A1000=Site),--(B1:B1000=Group),--(C1:C1000=Condition))

Site,Group,Condition can be cells holding required values

SUMPRODUCT cannot use whole columns i.e. A:A is not allowed and all arrays
must be same size.

HTH
"Kurt" wrote:

I'm using Excel to maintain records for participants in a multisite clinical
trial of therapy groups. I'd like to use a function that filters records
according to specific criteria so that I get a count of the records meeting
these criteria. I have a column in which I have recorded the research site
(Site A=1, Site B=2). Another column records the experimental condition to
which participants have been assigned (Control=0, Treatment=1). Therapy
group has been recorded in another column (Group 1=1, Group 2=2, etc.).
Here's and example of what the data looks like:

ID Site Condition Group
1 1 1 1
2 1 1 1
3 1 0 1
4 1 1 1
5 2 0 1
6 2 0 1
7 2 1 1
8 2 0 1

A table I could create to provide a breakdown of the number of participants
at each site in each group in each therapy group would look something like
this:

Site A
Group 1
Treatment 3
Control 1

Site B
Group 1
Treatment 1
Control 3

Certainly, a "COUNTIF" function could be used to provide a total number of
cells having the value of "0" and the total number of cells having the value
"1", but I'd like to be able to create a complex function based on multiple
criteria so I can produce a table like that depicted above.

Thanks in advance for any assistace provided.

Kurt

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
Help with copying dynamic column selected based on remote cell value and dynamic formula fill ers Charts and Charting in Excel 0 March 1st 06 01:05 AM
Calculating an average based on 2 and 3 criteria craggergirl Excel Worksheet Functions 2 February 24th 06 02:37 PM
sumproduct 2 columns based on criteria in 3rd column excel guru i''m not Excel Discussion (Misc queries) 5 December 31st 05 03:47 PM
creating a bar graph Johnfli Excel Discussion (Misc queries) 0 October 26th 05 08:16 PM
2 Columns - Show extra items in Column B orbojeff Excel Discussion (Misc queries) 3 October 7th 05 09:55 PM


All times are GMT +1. The time now is 10:33 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"