+ Reply to Thread
Results 1 to 10 of 10

Using Median IF to calculate the median for a specific criteria

  1. #1
    Forum Contributor
    Join Date
    11-23-2013
    Location
    La Crosse, Wi
    MS-Off Ver
    Excel 2010
    Posts
    106

    Using Median IF to calculate the median for a specific criteria

    I have two columns of values (ONI - Column D and Temps - Column E). I need to calculate the median of Temps when the ONI is in the 0.5 and 0.9 range, 1.0 and 1.4 range, and 1.5 and greater. Below is the formula that I am using to calculate the median temperature when the ONI is in the 0.5 and 0.9 range.

    =MEDIAN(IF(($D$5:$D$26>=0.5*($D$5:$D$26<=0.9)),$E$5:$E$26))

    It is producing differing values than if I just manually calculate the median for these cells.

    =MEDIAN(E5:E14)

    What am I doing wrong in my first formula?

    Thanks for any help!
    Attached Files Attached Files

  2. #2
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: Using Median IF to calculate the median for a specific criteria

    Hi,

    Of Course! values will differ, please check the range passed in Table 1: It is constant i.e 5 to 26 where as in case of your manual calculations you are passing range 5 to 14, 15 to 20 and so on..

    Hence value are gettting differ. just check the column All El Niņos (22 Winters) as range for both these columns are same it is giving almost match value. ie. 20.9 for table 1 and 20.8 in table 2.

    Hope it is clear to you now.


    Regards,
    Paresh J
    Click on "* Add Reputation" as a way to say thanks

  3. #3
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Using Median IF to calculate the median for a specific criteria

    Hi,

    Try below array formula:

    =MEDIAN(IF((($D$5:$D$26>=0.5)*($D$5:$D$26<=0.9)),$E$5:$E$26))

    Red bracket is the portion that you missed.

  4. #4
    Forum Contributor
    Join Date
    11-23-2013
    Location
    La Crosse, Wi
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Using Median IF to calculate the median for a specific criteria

    Thanks! That did the trick. I really appreciate your help with this.

  5. #5
    Valued Forum Contributor
    Join Date
    04-09-2013
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Using Median IF to calculate the median for a specific criteria

    Thanks for the feedback , you can mark the thread as solved and if you like you can give some reps points to members by clicking the add reputation button below the comments if you think the solution helped you.

  6. #6
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: Using Median IF to calculate the median for a specific criteria

    Hi,

    Please mark this thread as SOLVED if you got your solution and click * Add Reputation to all those who spend time to help you.

    Regards,
    Paresh J

  7. #7
    Forum Contributor
    Join Date
    11-23-2013
    Location
    La Crosse, Wi
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Using Median IF to calculate the median for a specific criteria

    How do you mark it as solved?

    Jeff

  8. #8
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: Using Median IF to calculate the median for a specific criteria

    At the start of the thread, go to thread tools > and click mark this as SOLVED

  9. #9
    Forum Contributor
    Join Date
    11-23-2013
    Location
    La Crosse, Wi
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Using Median IF to calculate the median for a specific criteria

    Thanks!

    Jeff

  10. #10
    Forum Contributor pareshj's Avatar
    Join Date
    05-20-2014
    Location
    MUMBAI
    MS-Off Ver
    2007 & 2010
    Posts
    447

    Re: Using Median IF to calculate the median for a specific criteria

    Hi,

    Please click * Add Reputation to all those who helped you to get your solution.

    Regards,
    Paresh J

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] calculate a MEDIAN using multiple criteria?
    By MetricsShiva in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 PM
  2. [SOLVED] calculate a MEDIAN using multiple criteria?
    By MetricsShiva in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 09:05 AM
  3. calculate a MEDIAN using multiple criteria?
    By MetricsShiva in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  4. [SOLVED] calculate a MEDIAN using multiple criteria?
    By MetricsShiva in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  5. [SOLVED] calculate a MEDIAN using multiple criteria?
    By MetricsShiva in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-19-2005, 12:05 PM

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