# Excel 2007 Formula to Calculate Mean In a Range

Hello,

Hoping someone can assist.  Please see attached example.  Can someone tell me how to put together a formula that looks at the entire range (A1:M13) and will take only the A's in column H and provide the mean score for A's only and place the result in cell P4, then take only the B's and provde the mean score in cell P5, followed by the C's placing the mean score in cell P6?

If this is not possible via formula then a VB solution would be fine too.

Thanks!

EE-Sample.xlsx

Last Comment
Escanaba
Patrick Matthews

THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
Anil

Not sure I understand.
How do you define the mean score for A ? Is i the sum of all the sum on that particular rwo ?
Please provide a examples for the mean score for A.

A>
Escanaba

Another way to look at this is if you ran a filter on column H for just A's.  Then, run an average for only those rows appearing in column A (filtered for A's only show only 3 rows).  In doing this, with the current example, the A's show a mean of 2.63, B's 2.80 and C's 2.70.  I'm hoping for a formula that can generate these results.

MP - I tried your formua and get the following results:  A 2.33, B 3.00 C 3.00.
Escanaba,

Please explain how you got 2.63, 2.8, and 2.7.

Based on the sample data you provided, my formula is right.

Patrick
Escanaba

Patrick - you were right.  When I was running the average formula on the filtered data it must of been reading unfiltered data throwing the results off.  When I manually calculated the average it matched what your formula was generating.  Thanks for providing the solution.
Microsoft Excel

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.

144K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts

TRUSTED BY