Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Calculating averages for subgroups

I have a worksheet that shows the sex of the student (M or F) and their test
scores.
How do I calculate the average for each subgroup rather than for the group
as a whole? I've converted the original "sex" data to numeric, but am still
stuck.

Col. A Col. B Col. C
M 1 65.2
M 1 77.5
F 2 83.4
F 2 59.7
M 1 59.6
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default Calculating averages for subgroups

Hi,

Try these array formulas:

=AVERAGE(IF((A1:A10="M"),D1:D10))

or

=AVERAGE(IF((B1:B10=1),D1:D10))

enter using Ctrl+Shift+Enter

HTH
Jean-Guy


M 1 65.2
M 1 77.5
F 2 83.4
F 2 59.7
M 1 59.6


M 1 65.2
M 1 77.5
F 2 83.4
F 2 59.7
M 1 59.6


M 1 65.2
M 1 77.5
F 2 83.4
F 2 59.7
M 1 59.6


M 1 65.2
M 1 77.5
F 2 83.4
F 2 59.7
M 1 59.6


"PSmith" wrote:

I have a worksheet that shows the sex of the student (M or F) and their test
scores.
How do I calculate the average for each subgroup rather than for the group
as a whole? I've converted the original "sex" data to numeric, but am still
stuck.

Col. A Col. B Col. C
M 1 65.2
M 1 77.5
F 2 83.4
F 2 59.7
M 1 59.6

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
Calculating Percentiles for Subgroups SteveC Excel Discussion (Misc queries) 2 March 5th 07 06:50 PM
Calculating Block Averages M.G. Excel Discussion (Misc queries) 5 January 15th 07 07:51 PM
Calculating weighted averages rgl Excel Discussion (Misc queries) 6 February 22nd 06 07:15 PM
calculating averages Golf Averages Excel Discussion (Misc queries) 1 August 15th 05 08:25 PM
calculating averages keving Excel Worksheet Functions 8 December 9th 04 02:23 AM


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