+ Reply to Thread
Results 1 to 7 of 7

Finding Averages between various dates

  1. #1
    Registered User
    Join Date
    07-28-2008
    Location
    Switzerland
    Posts
    19

    Finding Averages between various dates

    I have a start date in one colum and an end date in another column for a variety of projects.

    I also have daily values corresponding to each day for an entire year.

    I need somehow to make it so that Excel will take the dates between the start and end date (including the start and end date), and find an average value across all these days with the help of daily corresponding values. I tried using a VLOOKUP function but my success was limited to only managing to get the averages of the start and the end date, and not the average value of all the dates also in between the start and end date.

    Thank you!

  2. #2
    Forum Expert sweep's Avatar
    Join Date
    04-03-2007
    Location
    Great Sankey, Warrington, UK
    MS-Off Ver
    2003 / 2007 / 2010 / 2016 / 365
    Posts
    3,454

    Re: Finding Averages between various dates

    Hi,

    How about something along the lines of

    =AVERAGEIFS(B1:B100,A1:A100,">15/3/2010",A1:A100,"<19/3/2010")
    Rule 1: Never merge cells
    Rule 2: See rule 1

    "Tomorrow I'm going to be famous. All I need is a tennis racket and a hat".

  3. #3
    Registered User
    Join Date
    07-28-2008
    Location
    Switzerland
    Posts
    19

    Re: Finding Averages between various dates

    Didn't work. I'm getting a DIV/0 error. I really dont know what to do, and this is especially difficult because not all projects are the same length (some are 1 day some are 28 days). Anyone got any ideas?

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Finding Averages between various dates

    You might need to revise the dates based on your own locale (also use >= and <= I think per your OP) ... or just reference the start/end date cells accordingly.

    A #DIV/0! implies that no values meet the specified criteria (ie nothing to Average).

  5. #5
    Registered User
    Join Date
    07-28-2008
    Location
    Switzerland
    Posts
    19

    Re: Finding Averages between various dates

    This is what I'm currently using which is not working:

    =AVERAGEIFS(C1:C100,B1:B100,">=H2",B1:B100,"<=I2")

    where the C column is the value that i want averaged for each day. (600-800 range)

    where the B column is the date column corresponding to each C value. (21-Jan-08 format)

    where the H column is the beginning date of each project. (same format as above)

    where the I column is the end date for each project. (same format as above)

    any ideas?

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Finding Averages between various dates

    ">=H2" will treat H2 as a text string rather than a cell reference

    =AVERAGEIFS(C1:C100,B1:B100,">="&H2,B1:B100,"<="&I2)

  7. #7
    Registered User
    Join Date
    07-28-2008
    Location
    Switzerland
    Posts
    19

    Re: Finding Averages between various dates

    Thank you all very much for your input. DonkeyOte, your formula saved me! Thanks a lot!

+ 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