+ Reply to Thread
Results 1 to 3 of 3

conditional median

  1. #1
    Forum Contributor
    Join Date
    12-22-2012
    Location
    Asia
    MS-Off Ver
    Microsoft 365
    Posts
    234

    conditional median

    Hi

    I would like to calculate the median of a string of numbers taking into consideration only numbers that are positive and equal or below 20. Is that possible? I attach a sample file.
    Attached Files Attached Files

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: conditional median

    try =MEDIAN(IF(A1:A6<20,IF(A1:A6>0,A1:A6)))
    and enter using
    control + shift + enter as an array formula and get {} around the formula

    did you want to include 0 and include 20 if so then
    =MEDIAN(IF(A1:A6<=20,IF(A1:A6>=0,A1:A6)))

    to ignore blank cells
    =MEDIAN((IF(ISNUMBER(A1:A6),IF(A1:A6<=20,IF(A1:A6>=0,A1:A6)))))
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    12-15-2012
    Location
    In a bin
    MS-Off Ver
    Excel 2013
    Posts
    43

    Re: conditional median

    As you have Excel 2010, use the aggregate function.

    =AGGREGATE(18,6,A1:A5/((A1:A5>0)*(A1:A5<20)),0.5)

+ 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. Conditional Median Formula
    By mcfarcry in forum Excel General
    Replies: 2
    Last Post: 09-14-2011, 08:43 AM
  2. Conditional Median function
    By Maudise in forum Excel General
    Replies: 2
    Last Post: 02-28-2011, 07:06 AM
  3. Conditional Median Using Two Sale Dates
    By Appraiser18411 in forum Excel General
    Replies: 2
    Last Post: 09-07-2010, 02:34 AM
  4. [SOLVED] How to make a conditional Median function?
    By myra_deV in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-12-2006, 06:20 AM
  5. Conditional Median
    By warburger in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-12-2006, 10:48 AM

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