Finding Median if a value = 1.. help!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

MODE, MEDIAN and RANGE help 3
If, then 1
Median with Quantity Column 3
Median with Criteria 2
Median If in Excel not working 4
OptionButton with Bookmark text output 1
code to copy range 1
median if 4

Back
Top