+ Reply to Thread
Results 1 to 6 of 6

finding median with criteria

Hybrid View

  1. #1
    Registered User
    Join Date
    09-24-2007
    Posts
    66

    finding median with criteria

    how would I find the median of a group of numbers? I have a database with a group of numbers associated with a part number. I need to find the median of each part. Here is what I have tried, but it doesnt work
    =MEDIAN(IF(A:A=A2,B:B))

    please help
    thanks
    Attached Files Attached Files
    Last edited by mheinmiller; 12-18-2008 at 05:55 PM.

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

    Median (with criteria)

    Try this ARRAY FORMULA, which is committed with CTRL+SHIFT+ENTER
    (instead of just ENTER)

    =MEDIAN(IF(A1:A1000=A2,B1:B1000))

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  3. #3
    Registered User
    Join Date
    09-24-2007
    Posts
    66
    nope ... that doesnt work. its what i already tried

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Worked fine for me. In C2, array-enter =MEDIAN(IF($A$1:$A$1000 = A2, $B$1:$B$1000)) and copy down.

           --A--- --B-- --C---
       1   Part # Units median
       2    72663   102     97
       3    72663    51     97
       4    72663   175     97
       5    72663   158     97
       6    72663    22     97
       7    72663     8     97
       8    72663   227     97
       9    72663    97     97
      10    72663   414     97
      11    72663   251     97
      12    72663    48     97
      13    72663   113     97
      14    72663     3     97
      15    72663     3     97
      16    72663     4     97
      17    72734   144    316
      18    72734   186    316
      19    72734   251    316
      20    72734    21    316
      21    72734   190    316
      22    72734   138    316
    Entia non sunt multiplicanda sine necessitate

  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

    Median (with criteria)

    Using your posted workbook
    ...and...assuming the median value for B2:B16 is 97
    as calculated by: =MEDIAN(B2:B16)
    Then this ARRAY FORMULA (committed with CTRL+SHIFT+ENTER)

    =MEDIAN(IF(A1:A1000=A2,B1:B1000))
    ALSO returns 97.

    What am I missing?

  6. #6
    Registered User
    Join Date
    09-24-2007
    Posts
    66
    It worked ... sorry, I never used an array and I was inputting as formula!

    you were a big help - 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