+ Reply to Thread
Results 1 to 6 of 6

Average of Numbers if occured in last 90 days..

  1. #1
    Registered User
    Join Date
    08-15-2012
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    6

    Average of Numbers if occured in last 90 days..

    I'm trying to write a function that will do the following:

    If the date in column C is in the last 90 days, average the value in column H.

    I think I'm having an issue because column H is the difference in days between column C and another column. Any help would be appreciated!
    Last edited by ptho16; 08-16-2012 at 09:57 AM.

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Average of Numbers if occured in last 90 days..

    Try

    =AVERAGEIFS(H:H,C:C,"<="&TODAY(),C:C,">="&TODAY()-90)

  3. #3
    Registered User
    Join Date
    08-14-2012
    Location
    Rochester, NY
    MS-Off Ver
    Excel 2003, Excel 2010
    Posts
    10

    Re: Average of Numbers if occured in last 90 days..

    I'm not totally clear on what you're asking but it sounds like you want to average the column H, but only the values in rows where C falls within 90 days of now?

    Try this:

    =Average(If(Today()-C1:C100<90),H1:H100,FALSE))

    But instead of hitting, Enter, hit Ctrl+Shift+Enter, this is an array function.

    AverageIfs will do the trick as well

  4. #4
    Registered User
    Join Date
    08-15-2012
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Average of Numbers if occured in last 90 days..

    I get the #DIV/0! error, any ideas? both columns are populated with data.

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Average of Numbers if occured in last 90 days..

    You should only see that if there are no rows that meet the criteria. Did you try both suggestions?

  6. #6
    Registered User
    Join Date
    08-15-2012
    Location
    Baltimore, MD
    MS-Off Ver
    Excel 2010
    Posts
    6

    Re: Average of Numbers if occured in last 90 days..

    you're correct, I'm an idiot, i've got to increase the 90 days.

+ 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