+ Reply to Thread
Results 1 to 3 of 3

Finding the median

  1. #1
    Forum Contributor
    Join Date
    07-29-2009
    Location
    Melbourne, Australia
    MS-Off Ver
    365
    Posts
    255

    Finding the median

    Well I know how to find the median for a list of numbers using =median()

    But what if I have a list of prices for different types of say cars.


    Car Type Price

    A $10000
    B $15000
    A $20000
    C $30000


    Is there a macro that will return


    Car Type Median
    A $
    B $
    C $
    Last edited by pickslides; 11-11-2009 at 07:31 PM.
    Be who you are and say what you feel, because those who mind don't matter and those who matter don't mind.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: Finding the median

    Hi Pickslides, try the array formula:

    =MEDIAN(IF(A1:A4="A",B1:B4))

    Where A1:A4 have your car types, and B1:B4 your values. You could use the static value "A" as the car type, or refer to a cell that has the A in it, too.

    As with all array formulas, you must press CTRL+SHIFT+ENTER after typing or editing the formula, not just ENTER.

  3. #3
    Forum Contributor
    Join Date
    07-29-2009
    Location
    Melbourne, Australia
    MS-Off Ver
    365
    Posts
    255

    Re: Finding the median

    Thanks Paul

    Great solution.

    I am really enjoying these array formulas of late.

+ 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