+ Reply to Thread
Results 1 to 5 of 5

Median formula with multiple conditions

  1. #1
    Registered User
    Join Date
    08-10-2015
    Location
    Sarasota, FL
    MS-Off Ver
    2010
    Posts
    63

    Question Median formula with multiple conditions

    I am frustrated with several formulas today:

    1) I am trying to get a median number of J based on specific criteria from 2 columns (E and I in the attached file)
    {=MEDIAN(IF('2013'!I:I="Hospice",IF('2013'!E:E="Private",'2013'!J:J),0))}

    It is returning 0 when I should get 9.50 - I have tried several variations of formulas to do this including:

    =IF(AND('2013'!I:I="Hospice",'2013'!E:E="Private"),MEDIAN('2013'!J:J),0) as well as several others that I have lost during the process

    And I am getting either 0 or the NUM error

    2) I am also trying to get the median number of J based on when E=private but I does not equal hospice and cannot figure that one out in any way, shape or form

    3) I am also working on the average of the same items
    I have =AVERAGEIF('2013'!E:E,"*Private*",'2013'!J:J) to get the average of Private (includes Hospice) (comes to 11)
    and =AVERAGEIFS('2013'!J:J,'2013'!E:E,"*Private*",'2013'!I:I,"*Hospice*") to get the average of Private with Hospice (comes to 12.6)
    but I would like the Private number to be the average of the Private without the Hospice, and I have done circles with that one too, I keep ending up with a negative number

    Any and all assistance is greatly appreciated

    CHillFL aka Carol
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: 2019 but still use also older versions
    Posts
    7,601

    Re: Median formula with multiple conditions

    Hi Carol,

    Use array Formulas (I'm sure you know how to commit them):
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    08-10-2015
    Location
    Sarasota, FL
    MS-Off Ver
    2010
    Posts
    63

    Re: Median formula with multiple conditions

    Kaper - awesome! Thank you this worked great, I appreciate the assist! ~Carol

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: 2019 but still use also older versions
    Posts
    7,601

    Re: Median formula with multiple conditions

    To deal with "nothing found" situation you could use either (as you suggested):
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    or my suggestion would be rather:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Of course array formulas, and shown here only for average, but the same approach would work for median

  5. #5
    Registered User
    Join Date
    08-10-2015
    Location
    Sarasota, FL
    MS-Off Ver
    2010
    Posts
    63

    Re: Median formula with multiple conditions

    basically wrapping the whole thing with the iferror...got it! Thanks again! Carol

+ 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. Calculate Median based on multiple conditions
    By ncoday in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-05-2018, 02:33 PM
  2. Calculate Median with multiple conditions
    By Masun in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 11-23-2017, 05:54 AM
  3. MEDIAN with multiple conditions
    By aarona in forum Excel General
    Replies: 3
    Last Post: 02-01-2017, 10:42 PM
  4. [SOLVED] Median If formula for multiple rows - Excel 2010
    By riffology in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-30-2015, 06:57 PM
  5. Median for Range: 2 Conditions
    By PraveshG81 in forum Excel General
    Replies: 1
    Last Post: 02-02-2013, 07:33 PM
  6. calculating MEDIAN with conditions, VBA
    By Lifeseeker in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-06-2012, 03:01 AM
  7. Median calculation on multi-range with conditions
    By Lifeseeker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-22-2011, 03:32 PM

Tags for this Thread

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