+ Reply to Thread
Results 1 to 5 of 5

averageif for date range

  1. #1
    Registered User
    Join Date
    12-13-2012
    Location
    Victoria
    MS-Off Ver
    Excel 2003
    Posts
    6

    averageif for date range

    Hi all

    I'm having difficulties in making a formula that will calculate the average values based on a date range query. Attached is an example of the sheet, what I need is the average values from column "E" if the dates in column "A" are within that fiscal year. What I have so far is as follows:

    =averageif(($A$7:$A$11>=DATEVALUE("1/07/2010"))*($A$7:$A$11<=DATEVALUE("30/6/2011")),$E$7:$E$11)

    but is obviously wrong! I’m using Excel 03 and not sure if the averageif function will work on this version?!

    avgif date range example.xls

    With thanks in advance

    Tony

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: averageif for date range

    You can't use AVERAGEIF in Excel 2003 but you can do it almost the same way with an "array formula"

    =AVERAGE(IF(($A$7:$A$11>=DATE(2010,7,1))*($A$7:$A$11<DATE(2011,7,1)),$E$7:$E$11))

    confirm that with CTRL+SHIFT+ENTER so that curly braces like { and } appear around the formula in the formula bar
    Audere est facere

  3. #3
    Registered User
    Join Date
    12-13-2012
    Location
    Victoria
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: averageif for date range

    Thanks for the quick response, and I've tested with an array however get a "value not available" error. Do I need to amend my date to the US format (yyyy,mm,dd) or visa versa?

  4. #4
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: averageif for date range

    The data format should not change since the DATE function only uses year,month,day for the function arguments in that arrangement.

    Please ensure you have entered the formula as an array formula by using Ctrl-Shift-Enter.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  5. #5
    Registered User
    Join Date
    12-13-2012
    Location
    Victoria
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: averageif for date range

    ... Thanks again, not sure what I did with the copy and past but its working now.


    Cheers DLL.

    Tony

+ 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