+ Reply to Thread
Results 1 to 5 of 5

Using Median with a look up function

  1. #1
    Registered User
    Join Date
    09-04-2008
    Location
    Cherry Hill, NJ
    MS-Off Ver
    2007
    Posts
    37

    Using Median with a look up function

    Hello,
    I have two columns of data

    1st - Multiple physician names (may be duplicate as data set is Emergency Room encounters)

    2nd - Denotes the length of stay in minutes for each patient encounter

    I want to develop a formula to calculate the median length of stay (off 2nd col) for every physician a select in a drop down.

    Thanks!
    Last edited by rgold; 10-07-2008 at 04:20 PM.

  2. #2
    Registered User
    Join Date
    10-07-2008
    Location
    Wessex
    Posts
    55
    =MEDIAN(IF(A2:A20="Physician",B2:B20))

    this is an array formula, so commit with Ctrl-Shift-Enter, not just Enter

  3. #3
    Registered User
    Join Date
    09-04-2008
    Location
    Cherry Hill, NJ
    MS-Off Ver
    2007
    Posts
    37
    Thank you for the prompt response. It worked!

    Rob

  4. #4
    Registered User
    Join Date
    09-04-2008
    Location
    Cherry Hill, NJ
    MS-Off Ver
    2007
    Posts
    37
    Martesoft,
    Quick question. How do you know when you have to use control+shift+enter and when you don't? Thanks.

    Rob

  5. #5
    Registered User
    Join Date
    10-07-2008
    Location
    Wessex
    Posts
    55
    Basically, you eed to array-enter it if you use a range, an array, in a function that normally expects a single cell reference, like the IF in our example.

+ 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. How does this code output the coefficients of a trendline?
    By gshock in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-13-2010, 05:54 PM
  2. Modify a Function to add an extra condition
    By King_Quake in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-03-2008, 04:32 PM
  3. problem with median function
    By holybull in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-13-2008, 11:18 AM
  4. median if function
    By jlogan987 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-08-2007, 12:24 PM
  5. Analysis Toolpak Function XIRR and VBA - XL 2007
    By rvExcelNewTip in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-02-2007, 04:35 AM

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