![]() |
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 |
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 |
All times are GMT +1. The time now is 12:39 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com