+ Reply to Thread
Results 1 to 3 of 3

Conditional Median function

  1. #1
    Registered User
    Join Date
    08-09-2010
    Location
    Midlands
    MS-Off Ver
    Excel 2010
    Posts
    38

    Conditional Median function

    Hi,

    I've looked around for previous questions on this but can't seem to get the other answers working. I am trying to make a conditional Median function which will eventually be based on several conditions.

    I have attached a test file to help explain what I need it to do;

    I want to return in the table the median based on the following criteria;
    where Criteria 1 is greater than 0 and less than 300 (or different banding),
    where criteria 2 is the corresponding month in the table
    return the median of Data!Output

    I have managed to get the single conditional working of;
    [/code]
    {=Median(if((Data!$B:$B>100),data!$C:$C))}
    however when I try and add another If statement it doesn't seem to work and I get #num errors.

    Any / all help would be appreciated.
    Attached Files Attached Files
    Last edited by Maudise; 02-28-2011 at 07:05 AM. Reason: Solved

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Conditional Median function

    Try this formula in B3

    =IFERROR(MEDIAN(IF(Data!$B$2:$B$100>=$A3,IF(Data!$B$2:$B$100<=EOMONTH($A3,0),IF(Data!$A$2:$A$100>= B$1,IF(Data!$A$2:$A$100<C$1,Data!$C$2:$C$100))))),"")

    confirmed with CTRL+SHIFT+ENTER and copied across and down

    You'll need a large number in L1 to make column K work
    Audere est facere

  3. #3
    Registered User
    Join Date
    08-09-2010
    Location
    Midlands
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Conditional Median function

    That worked thanks - need to change some of the dates on my master sheet to make it work but the rest of the formula worked perfectly - 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