+ Reply to Thread
Results 1 to 3 of 3

Finding Median if a value = 1.. help!

  1. #1
    Greg
    Guest

    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. #2
    Biff
    Guest

    Finding Median if a value = 1.. help!

    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. #3
    Biff
    Guest

    Finding Median if a value = 1.. help!

    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 to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1