+ Reply to Thread
Results 1 to 4 of 4

Subtotal / Median IF

  1. #1
    Registered User
    Join Date
    08-22-2017
    Location
    NYC
    MS-Off Ver
    2013
    Posts
    3

    Subtotal / Median IF

    Need help nestling subtotal into a median if formula. Greatly appreciate any help.

    =IFERROR(MEDIAN(IF($H$12:$H$232=$C238,IF(ISNUMBER(L$12:L$232),IF(L$12:L$232>0,L$12:L$232)))),"")

  2. #2
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Subtotal / Median IF

    Welcome to the forum!

    Are you able to post a small sample workbook so we have data with which we can work and experiment? You can post a workbook using Go Advanced --> Manage Attachments to bring up the attachment window. Please be sure to alter or remove any sensitive data.
    If your problem has been solved, please use "Thread Tools" to mark the thread as "Solved".

    If you're grateful for this site's existence and would like to contribute to the community, please consider posting something hilarious in our joke thread:
    https://www.excelforum.com/the-water...ke-thread.html

  3. #3
    Registered User
    Join Date
    08-22-2017
    Location
    NYC
    MS-Off Ver
    2013
    Posts
    3

    Re: Subtotal / Median IF

    Unfortunately, i'm unable to attach files. For example, as i filter thru fruit category in the below example, i would like to obtain medians for the categories down below. The current formula i'm using capture visible and invisible row.

    Fruit Number
    Apples 5
    Oranges 10
    Grapes 12
    Apples 15
    Oranges 6
    Grapes 9
    Apples 8
    Oranges 5
    Grapes 6
    Apples 2
    Oranges 3
    Grapes 2
    Apples 1
    Oranges 8

    Categories Median
    Apples ?
    Oranges ?
    Grapes ?

  4. #4
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Subtotal / Median IF

    I would advise avoiding all of the nesting IF clauses. If your data is in A2:B16 and your category filter is in D2, use the following array-formula (confirm with Ctrl + Shift + Enter instead of Enter):

    =MEDIAN(IF(($A$2:$A$16=$D2)*($B$2:$B$16>0),$B$2:$B$16))

    Try experimenting with the attachment to see if it's working as desired, then adjust the ranges for your actual data:
    Attached Files Attached Files

+ 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. Replies: 2
    Last Post: 04-26-2017, 11:28 AM
  2. Replies: 8
    Last Post: 08-09-2016, 12:50 AM
  3. [SOLVED] Adding Subtotal to a Median IF Function
    By elfvis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-10-2015, 03:26 PM
  4. Median Indirect: Find median in range and bring back adjacent cells
    By Keelin in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-27-2014, 08:31 AM
  5. [SOLVED] Median Ifs, need to find median $ amount per deal for each year
    By xenomorph8472 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-13-2012, 02:01 PM
  6. MEDIAN Subtotal??
    By elfiky in forum Excel General
    Replies: 1
    Last Post: 08-15-2008, 09:12 AM
  7. [SOLVED] Subtotal the median
    By Terri in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-26-2006, 12:45 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