Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Finding Median if a value = 1.. help!
Hello,
What I'm trying to do is this: I have a worksheet that has two columns, Gender and Age. Gender's value can be 1 or 2, 1 meaning male and 2 meaning female. I've been trying to figure out a function that will select all values that are 1 and taking the age from the next column and then finding the median of those values. I've tried VLOOKUP and wierd IF functions to get this to work, but I cannot get the correct values to be outputted. Also, if you have any idea how to do mode and range for this same set of data it would be greatly appreciated. Thanks. |
#2
|
|||
|
|||
Hi!
Both array entered with the key combo of CTRL,SHIFT,ENTER: =MEDIAN(IF(A1:A20=1,B1:B20)) =MODE(IF(A1:A20=1,B1:B20)) Not sure what you mean by "range"? Biff -----Original Message----- Hello, What I'm trying to do is this: I have a worksheet that has two columns, Gender and Age. Gender's value can be 1 or 2, 1 meaning male and 2 meaning female. I've been trying to figure out a function that will select all values that are 1 and taking the age from the next column and then finding the median of those values. I've tried VLOOKUP and wierd IF functions to get this to work, but I cannot get the correct values to be outputted. Also, if you have any idea how to do mode and range for this same set of data it would be greatly appreciated. Thanks. . |
#3
|
|||
|
|||
Hi!
If by "range" you mean the youngest/oldest: Array entered: =MIN(IF(A1:A20=1,B1:B20)) =MAX(IF(A1:A20=1,B1:B20)) Biff -----Original Message----- Hi! Both array entered with the key combo of CTRL,SHIFT,ENTER: =MEDIAN(IF(A1:A20=1,B1:B20)) =MODE(IF(A1:A20=1,B1:B20)) Not sure what you mean by "range"? Biff -----Original Message----- Hello, What I'm trying to do is this: I have a worksheet that has two columns, Gender and Age. Gender's value can be 1 or 2, 1 meaning male and 2 meaning female. I've been trying to figure out a function that will select all values that are 1 and taking the age from the next column and then finding the median of those values. I've tried VLOOKUP and wierd IF functions to get this to work, but I cannot get the correct values to be outputted. Also, if you have any idea how to do mode and range for this same set of data it would be greatly appreciated. Thanks. . . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Finding Cell References | Excel Discussion (Misc queries) | |||
How can i imput a formula in excel for finding the area of a regu. | Excel Discussion (Misc queries) | |||
Can I use median function in Pivot Tables? | Excel Worksheet Functions | |||
Excel's Pivot Table & Subtotal function should have a median fie. | Excel Worksheet Functions | |||
Summarize by "Median" in the Pivot Table Field for Excel | Excel Worksheet Functions |