+ Reply to Thread
Results 1 to 10 of 10

Median if formula not working

  1. #1
    Registered User
    Join Date
    08-10-2017
    Location
    Austin
    MS-Off Ver
    2010
    Posts
    27

    Median if formula not working

    I can't figure out what's wrong with my median if formula--this is what I'm using:

    {=MEDIAN(IF('Hours per Client'!$I$2:$I$608=A2,'Hours per Client'!$E$2:$E$608))} (the curvy brackets representing ctrl-shift-enter)

    but it keeps returning "N/A":

    median if.png

    I tried changing the formula to {=MEDIAN(IF('Hours per Client'!$I:$I=A2,'Hours per Client'!$E:$E))} but that didn't work either:

    median if 2.png

    What am I doing wrong?

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Median if formula not working

    post a small file with some data. need to see how cells are formatted and write in expected result.

  3. #3
    Forum Contributor shivya's Avatar
    Join Date
    08-19-2017
    Location
    Delhi, India
    MS-Off Ver
    2013
    Posts
    240

    Re: Median if formula not working

    Evaluate the formula, you will find error.

    In my knowledge, syntax of median formula is =median(number1,number2,...)
    The result of inner formula should be in number.
    To attach worksheet Go advanced -> Manage attachments -> Choose file -> Upload
    Don't forget to Mention your desired result in the sheet..
    There should be sample data only, a lot of data creates confusion.

    Thanks & Regards

    Shivya

    http://excelvbatipsforbeginners.blogspot.in/

  4. #4
    Registered User
    Join Date
    08-10-2017
    Location
    Austin
    MS-Off Ver
    2010
    Posts
    27

    Re: Median if formula not working

    I wonder if a screenshot would be okay...? Here's the Hours per Client page that my median if formula references. The formula bar has the text formula for I2.

    median if 3.png

    I can upload a spreadsheet if the screenshot isn't enough.
    Last edited by micina; 11-07-2017 at 11:36 AM.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,036

    Re: Median if formula not working

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    08-10-2017
    Location
    Austin
    MS-Off Ver
    2010
    Posts
    27

    Re: Median if formula not working

    I've attached the file:
    Attached Files Attached Files

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Median if formula not working

    Cell I608 is what's causing the error.

    If you delete the #N/A error in I608 your formula should work fine.

    One thing to note is that you should not use whole column references with array formulas. Limit your ranges to as small as possible.

  8. #8
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Median if formula not working

    If you do not want to get rid of the error in I608, this should work:

    B2 =MEDIAN(IF(IFERROR('Hours per Client'!I$2:I$608,"")=A2,'Hours per Client'!E$2:E$608)) Ctrl Shift Enter

  9. #9
    Registered User
    Join Date
    08-10-2017
    Location
    Austin
    MS-Off Ver
    2010
    Posts
    27

    Re: Median if formula not working

    Ahhhh that makes complete sense. Thank you!! Your formula works perfectly

  10. #10
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Median if formula not working

    You're welcome.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

+ 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. Working out median whilst filtering on participant number and trial type
    By Rachel_King in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-19-2015, 10:14 AM
  3. Problem with MEDIAN function - Not working for 10:00 only
    By Runo79 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-01-2014, 04:31 AM
  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 with IF function not working
    By happycynic80 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-01-2014, 05:40 PM
  6. [SOLVED] Median with IF not working?
    By chriskopf in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-08-2013, 02:59 PM
  7. [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

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