+ Reply to Thread
Results 1 to 9 of 9

Won't calculate Median Value

  1. #1
    Forum Contributor
    Join Date
    06-21-2006
    MS-Off Ver
    2007
    Posts
    141

    Won't calculate Median Value

    I have a conditional median value formula that works on every other column except one. The formatting is the same between the two, there are values for it to calculate, but it returns a zero. The formula is good, am I missing something with the data it's going through?

    Here's the formula, but like I mentioned, it's working perfectly with similar data in the same workbook.

    {=MEDIAN(IF((('2007'!$D$2:$D$500=F44)),'2007'!$BM$2:$BM$500))}

    Any ideas?
    Last edited by braydon16; 12-09-2010 at 06:01 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,792

    Re: Won't calculate Median Value

    Perhaps the values in column BM are formatted as text - what do you get with this formula?

    =ISNUMBER('2007'!BM2)

    You could convert to numeric with text to columns - select column BM - Data > Text to columns > Finish

    or adjust the formula, try

    =MEDIAN(IF('2007'!$D$2:$D$500=F44,'2007'!$BM$2:$BM$500+0))

    confirmed with CTRL+SHIFT+ENTER
    Audere est facere

  3. #3
    Forum Contributor
    Join Date
    06-21-2006
    MS-Off Ver
    2007
    Posts
    141

    Re: Won't calculate Median Value

    I checked and all of them are formatted as currency. I inserted a column next to BM to check ISNUMBER, and all of the values came up True. I'm stumped...

  4. #4
    Forum Contributor
    Join Date
    06-21-2006
    MS-Off Ver
    2007
    Posts
    141

    Re: Won't calculate Median Value

    I've attached a copy of the file and the formula I'm having an issue with.
    Attached Files Attached Files

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Won't calculate Median Value

    Try this ARRAY FORMULA...
    Please Login or Register  to view this content.
    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  6. #6
    Forum Contributor
    Join Date
    06-21-2006
    MS-Off Ver
    2007
    Posts
    141

    Re: Won't calculate Median Value

    I'm still getting 0 when there are obviously numbers to generate a median from. What's weird is if I go through the list one at a time, there is a point where if I start deleting lines, it begins to calculate a median. I've checked formatting, formulas, everything.

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,792

    Re: Won't calculate Median Value

    Did you try Ron's suggestion - it works for me

    Your original formula was counting blank cells in column G as zeros....and because there are many of those the median is also zero. Ron's version takes those zeroes out

  8. #8
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Won't calculate Median Value

    I attached an edited version of your posted file.
    In that file I posted the exact ARRAY FORMULA that I posted above:
    C2: =MEDIAN(IF(($F$7:$F$505=B2)*($G$7:$G$505<>""),$G$7:$G$505))

    I copied C2 and pasted it into C3:C5.

    All formulas calculated the correct median.

    Am I missing something?
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    06-21-2006
    MS-Off Ver
    2007
    Posts
    141

    Re: Won't calculate Median Value

    Not sure what I did when I put it in the main worksheet the first time, but it's working now. Sorry for the confusion! I really appreciate the quick response!!!

+ 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