+ Reply to Thread
Results 1 to 10 of 10

Median if returning "#NUM"

  1. #1
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Median if returning "#NUM"

    Hi there,

    I am experiencing some difficulties with a simple median if function in Excel. I have attached the worksheet.

    In "mediansnapsholos report matrix" worksheet, you see a table with few numbers. B3 is where the formula begins.

    Please Login or Register  to view this content.

    I have also used control_shift_enter, but I still get 0s. I have done this before, but seem to be stuck at this one.

    Is anyone able to assist?

    Thanks
    Attached Files Attached Files
    Last edited by Lifeseeker; 08-01-2012 at 10:18 AM.

  2. #2
    Forum Contributor CheshireCat's Avatar
    Join Date
    10-11-2011
    Location
    Victoria, Canada
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    258

    Re: Median if returning "#NUM"

    Your range 'MedianSnapshotLOS Report Matrix'B2:M2 is formatted as text. It is invalidating the comparison to YTDraw!$A$2:$A$995.
    Docendo discimus.

  3. #3
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Re: Median if returning "#NUM"

    Hi,

    still not working. Columns with numbers are formatted as "number" now...


    Please Login or Register  to view this content.
    any other ideas?
    Attached Files Attached Files

  4. #4
    Forum Contributor CheshireCat's Avatar
    Join Date
    10-11-2011
    Location
    Victoria, Canada
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    258

    Re: Median if returning "#NUM"

    I still see issues with that range, try re-entering the values or copy-paste-add a zero to get the numbers to be recognized.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Median if returning "#NUM"

    1. The values in row 2 are still text. You can convert them to numbers by copying an empty cell, and doing paste special, and tick Add.

    2. You've entered the formula as a single array formula throughout the 36 cells. It should be one array formula in B2 copied throughout the range:

    =IFERROR(MEDIAN(IF((YTDraw!$C$2:$C$995='MedianSnapshotLOS Report Matrix'!$A3)*(YTDraw!$A$2:$A$995='MedianSnapshotLOS Report Matrix'!B$2), YTDraw!$E$2:$E$995)),0)

    Please Login or Register  to view this content.
    3. You do yourself a disservice centering all your data and minimizing the column widths. If you restore Excel's default horizontal alignment ("General"), numbers align right and text aligns left, which would cue the source of the first problem.
    Last edited by shg; 07-30-2012 at 05:19 PM.
    Entia non sunt multiplicanda sine necessitate

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Median if returning "#NUM"

    You could also do the conversion within the formula with a strategically placed +0.....

    Try this formula in B3

    =IFERROR(MEDIAN(IF((YTDraw!$C$2:$C$995=$A3)*(YTDraw!$A$2:$A$995=B$2+0),YTDraw!$E$2:$E$995)),0)

    confirm with CTRL+SHIFT+ENTER and then copy across and down
    Audere est facere

  7. #7
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256

    Re: Median if returning "#NUM"

    Or...
    Sheet: MedianSnapshotLOS Report Matrix
    Range: B2:M2 Format as General, Retype the numbers
    //Ola
    Mark the problem as Solved under the Yellow bar up Top right, under Thread Tools, when you received a solution.
    It saves time, to skip already solved threads.

  8. #8
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Re: Median if returning "#NUM"

    Hi,

    I am still struggling with it.

    Please Login or Register  to view this content.
    I put this formula in B2 and pressed control + shift+ enter. I still get 0.

    any other ideas? I must be missing something.
    Attached Files Attached Files

  9. #9
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Median if returning "#NUM"

    column references are wrong-you can't get a median of text strings. formula should be
    =IFERROR(MEDIAN(IF((YTDraw!$C$2:$C$995=$A2)*(YTDraw!$A$2:$A$995=B$1),YTDraw!$D$2:$D$995)),0)
    with cse.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  10. #10
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Re: Median if returning "#NUM"

    Ahh, problem solved!

    THanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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