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
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

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
 

Forum statistics

Threads
1,141,167
Messages
5,704,678
Members
421,361
Latest member
Capper2824

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top