+ Reply to Thread
Results 1 to 6 of 6

Excel 2007 : AVERAGEIFS formula not working

  1. #1
    Registered User
    Join Date
    10-03-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    51

    AVERAGEIFS formula not working

    Hello, I am trying to write a formula that calculates the average number of working days between a date in column Q and another date in column T, based on the following conditions:


    The value in T falls within date range 02/01/2012 - 29/01/2012
    The value in column Q is not blank
    The value in column F is "Yes"

    I have tried to write this using AVERAGEIFS but I don't know how to factor in the date condition for column T.....please can anyone assist?

    Many Thanks

  2. #2
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: AVERAGEIFS formula not working

    Try this array formula

    =AVERAGE(IF(($T$2:$T$200<=--"2012-01-29")*($T$2:$T$200>=--"2012-01-02")*($Q$2:$Q$200<>"")*($F$2:$F$200="Yes"),$T$2:$T$200-$Q$2:$Q$200))

    Commit with Ctrl-Shift-Enter, not just Enter.

  3. #3
    Registered User
    Join Date
    10-03-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: AVERAGEIFS formula not working

    Thank you, Bob....this doesn't appear to be working exactly as hoped...it isn't recognising that saturday and sunday are not working days. Does it need the NETWORKDAYS function in it somewhere?

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

    Re: AVERAGEIFS formula not working

    Is T later than Q or vice versa?
    Audere est facere

  5. #5
    Registered User
    Join Date
    10-03-2011
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    51

    Re: AVERAGEIFS formula not working

    Q occurs first.......it marks the start of an investigation. T is the date on which the investigation was completed.

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

    Re: AVERAGEIFS formula not working

    Try this version of Bob's suggested formula

    =AVERAGE(IF(($T$2:$T$200<=--"2012-01-29")*($T$2:$T$200>=--"2012-01-02")*($Q$2:$Q$200<>"")*($F$2:$F$200="Yes"),NETWORKDAYS(--$Q$2:$Q$200,--$T$2:$T$200)))

    confirmed with CTRL+SHIFT+ENTER

+ 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