+ Reply to Thread
Results 1 to 5 of 5

Calculate Median based on a conditional operator

Hybrid View

  1. #1
    Registered User
    Join Date
    09-20-2012
    Location
    Kansas City
    MS-Off Ver
    Excel 2010
    Posts
    12

    Calculate Median based on a conditional operator

    I'm trying to calculate the median value of a subset of values based on a conditional operator. The formula I'm attempting utilizes an array but I'm not sure what I'm doing wrong.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,983

    Re: Calculate Median based on a conditional operator

    E3=aggregate(16,2,a2:a100/(a2:a100<>"")/(a2:a100<=d3),0.5)



    E3=AGGREGATE(16,2,A:A/(A:A<>"")/(A:A<=D3),0.5)


    empty cell are zero in Array
    Last edited by CARACALLA; 10-25-2021 at 03:19 PM.

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,094

    Re: Calculate Median based on a conditional operator

    its because you are using the whole column reference - change to A:A to the actual range A2:A15

    Not 100% sure why, but i have seen these issues in quite a few array formulas and know to referer to the actual range
    i'm sure someone may explain why with more knowledge then myself

    =MEDIAN(IF(A2:A15<=D3,A2:A15))
    as an array
    {=MEDIAN(IF(A2:A15<=D3,A2:A15))}
    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.

  4. #4
    Registered User
    Join Date
    09-20-2012
    Location
    Kansas City
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Calculate Median based on a conditional operator

    Thanks Wayne, you solved my problem. It is odd that I couldn't reference the entire column but I think I learn something new about arrays every time I use them.

    Thank you for solving my issue and have a great day!!

  5. #5
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,983

    Re: Calculate Median based on a conditional operator

    Formula post 2 works ?

+ 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 avg & median hours in a date series based on values in separate column
    By TPower1 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-08-2019, 01:53 AM
  2. Calculate Median based on multiple conditions
    By ncoday in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-05-2018, 02:33 PM
  3. [SOLVED] Using Median IF to calculate the median for a specific criteria
    By boynejs in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-20-2014, 01:50 AM
  4. [SOLVED] Calculate Mode, Median and Average based on data in 3 columns
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-02-2014, 05:56 PM
  5. [SOLVED] Calculate the median of a range based on text content and then £ value
    By Wilgoss in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-29-2012, 04:55 PM
  6. Replies: 8
    Last Post: 07-24-2012, 09:43 PM
  7. Calculate Median using conditional based on dates
    By Shai-Hulud in forum Excel General
    Replies: 4
    Last Post: 01-23-2008, 12:39 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