AVERAGE / MEDIAN formula question

12345678

New Member
Joined
Sep 25, 2006
Messages
1
Formulas question:

How can I create a condition to pull information from one column based on another column (like a VLOOKUP), and average the information in all the cells according to the criteria (without changing when I re-sort the data set)?

For example, I have three columns of data:

AGE WEIGHT HEIGHT
7 70 48
7 75 51
8 90 42
8 87 53

What formula(s) do I need to get an average and median height and for all people age 7?

thanks
 

Some videos you may like

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hi, welcome to the board!

Something like this:

For Median:
=MEDIAN(IF($A$2:$A$5=7,$C$2:$C$5))

Confirm with CTRL-SHIFT-ENTER rather than just Enter

For Average:
=AVERAGE(IF($A$2:$A$5=7,$C$2:$C$5))

Confirm with CTRL-SHIFT-ENTER rather than just Enter
 

mortgageman

Well-known Member
Joined
Jun 30, 2005
Messages
2,015
Enter the following formual WITHOUT THE CURLY BRACES. Then confirm with CONTROL SHIFT ENTER (NOT JUST ENTER). For median , just replace average with median


{=AVERAGE(IF(A1:A4=7,C1:C4))}

Gene, "The Mortgage Man, Klein
 

Watch MrExcel Video

Forum statistics

Threads
1,111,599
Messages
5,541,166
Members
410,543
Latest member
ExcelGlenn
Top