+ Reply to Thread
Results 1 to 4 of 4

Average Based on Dynamic Date Criteria

  1. #1
    Forum Contributor
    Join Date
    10-16-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2003, 2010
    Posts
    151

    Average Based on Dynamic Date Criteria

    Averageifs.xlsx

    Greetings all

    I have a workbook where I am trying to get an average cost based on date range and item number. The attached workbook has a column named Average Cost which shows the desired output and it has what I tried to enter as the syntax for my AVERAGEIFS function that results in an error. I do it for a report using a macro but I just can't seem to get my head around the solution as a spreadsheet formula.

    I would appreciate any help in pointing me in the right direction.
    Last edited by jacob@thepenpoint; 10-17-2012 at 08:09 AM.
    Jacob Albers
    Excel 2003 & 2010

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Average Based on Dynamic Date Criteria

    In D6: =AVERAGEIFS($C:$C,$B:$B, $B6,$A:$A,">="&$A6-6)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    10-16-2010
    Location
    Memphis, TN
    MS-Off Ver
    Excel 2003, 2010
    Posts
    151

    Re: Average Based on Dynamic Date Criteria

    Jerry, that works beautifully! Thanks! I keep trying to convince myself when dealing with ampersands and quotes that if they don't kill me, they will make me stronger, but so far, I'm not convinced. Thanks again!

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Average Based on Dynamic Date Criteria

    They will make you stronger.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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