Results 1 to 3 of 3

Need help with array function using MEDIAN and nested IF with boolean AND

Threaded View

  1. #1
    Registered User
    Join Date
    04-10-2013
    Location
    US
    MS-Off Ver
    Excel 2013
    Posts
    2

    Need help with array function using MEDIAN and nested IF with boolean AND

    Hello!

    I could really use a hand with a frustrating set of formulas. Here's the setup. I have tabular data, such as:

    Col A Col B Col C
    Name Type Time
    Bob Incident 30
    Susan Request 10
    Bob Incident 20
    Dan Other 40

    on a sheet called "TT Data." There are a few sets of calculations I need to perform. One is to calculate the Average and Median Time for all rows with Type "Incident". This I have been able to get, with the following formulas:
    =AVERAGEIF('TT Data'!B1:B50000, "=Incident", 'TT Data'!C1:C50000)
    {=MEDIAN(IF('TT Data'!B1:B50000="Incident",'TT Data'C1:C50000))}

    So far so good (hopefully those formula are correct!). Now things get a little trickier, as I need to find the Average and Median Time for all rows that are Type “Incident” and Name “Bob”
    Averageifs seems to work OK:

    =AVERAGEIFS('TT Data'!C1:C50000,'TT Data'!B1:B50000,"=Incident",'TT Data'!A1:A50000,"=Bob" )

    I’m running into trouble trying to use a logical AND operation in the array Median/nested IF function. Here is the formula I’m using:

    {=MEDIAN(IF(AND('TT Data'!B1:B50000="Incident",'TT Data'!A1:A50000="Bob"),'TTR= Data'!C1:C50000))}

    Excel accepts the formula, and spits out a total, but I know it’s incorrect. Looking further, it appears that as soon as it encounters a row that does not meet the criteria, the total is always zero. To test, I limited the range to one that I knew included only those that meet the criteria, and the median result was correct. Why does this happen? Is there a better way to “AND” these criteria together?

    Thank you very much for any advice!
    Last edited by account-ant; 04-10-2013 at 04:52 PM. Reason: had a followup question

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