+ Reply to Thread
Results 1 to 5 of 5

Help calculating median with multiple criteria

  1. #1
    Forum Contributor
    Join Date
    01-11-2013
    Location
    Sweden
    MS-Off Ver
    MS 365
    Posts
    188

    Help calculating median with multiple criteria

    Hi all,

    I have a excel table with three columns. I need help calculating the median for specific codes when specific criteria are met. Please see attached workbook.

    /Masun
    Attached Files Attached Files

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

    Re: Help calculating median with multiple criteria

    I used this "array formula" in K2

    =MEDIAN(IF(LEFT(B$12:B$300,LEN(G2))=G2&"",IF(C$12:C$300<>"",D$12:D$300)))

    confirmed with CTRL+SHIFT+ENTER and copied down

    Edit: or you can use table refs like this:

    =MEDIAN(IF(LEFT(Tabell1[Code],LEN(G2))=G2&"",IF(Tabell1[Date]<>"",Tabell1[Wtn days])))

    You may require semi-colon separators for your region rather than commas, see attached
    Attached Files Attached Files
    Last edited by daddylonglegs; 03-22-2015 at 11:53 AM.
    Audere est facere

  3. #3
    Forum Contributor
    Join Date
    01-11-2013
    Location
    Sweden
    MS-Off Ver
    MS 365
    Posts
    188

    Re: Help calculating median with multiple criteria

    Hi,

    Thanks, works great. If i add data in the table is there any risk with using an array formula? Do i need to re-confirm it?

    /Masun

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,730

    Re: Help calculating median with multiple criteria

    No, if you are using the table notation any data added should be included in the formula. You only have to re-confirm the formula if you need to change the formula for some other reason, e.g. changed or additional criteria

  5. #5
    Forum Contributor
    Join Date
    01-11-2013
    Location
    Sweden
    MS-Off Ver
    MS 365
    Posts
    188

    Re: Help calculating median with multiple criteria

    Hi,

    Thanks for the help and lesson.

    /Masun

+ 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. YTD Median using Multiple Criteria
    By Decatur83 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-07-2013, 09:00 AM
  2. Replies: 3
    Last Post: 12-27-2012, 04:10 PM
  3. median if with multiple criteria
    By coffee_man in forum Excel General
    Replies: 2
    Last Post: 10-20-2011, 06:36 AM
  4. [SOLVED] calculate a MEDIAN using multiple criteria?
    By MetricsShiva in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 PM
  5. calculate a MEDIAN using multiple criteria?
    By MetricsShiva in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-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