+ Reply to Thread
Results 1 to 6 of 6

Average amount between a date range

  1. #1
    Registered User
    Join Date
    01-12-2015
    Location
    Manchester
    MS-Off Ver
    2007
    Posts
    17

    Average amount between a date range

    Hi,

    I would like to average column B if column A is between a certain date range.

    Column A Column B

    Date Amount
    01/01/2015 £10.00
    01/01/2015 £20.00
    02/01/2015 £30.00
    02/01/2015 £40.00
    02/01/2015 £50.00
    03/01/2015 £100.00
    04/01/2015 £70.00
    05/01/2015 £10.00
    06/01/2015 £20.00
    07/01/2015 £40.00
    08/01/2015 £100.00

    Date Average amount
    01/01/2015 - 07/01/2015 £39.00
    08/01/2015 - 14/01/2015 £100.00

    Thank you in advance.

    Rachael

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Average amount between a date range

    Hi there. try this:
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,695

    Re: Average amount between a date range

    How are you specifying the start date and end date of the range? It would be better to put them in separate cells, maybe in C2 and D2 with this formula in E2:

    =AVERAGEIFS(B:B,A:A,">"&C2,A:A,"<"&D2)

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    03-18-2015
    Location
    Windsor, England
    MS-Off Ver
    2013
    Posts
    13

    Re: Average amount between a date range

    Assuming dates are in A2:A12, amounts in B2:B12, and first date from in D3, and first date to in E3, then:



    =SUMPRODUCT(($A$2:$A$12>=$D3)*($A$2:$A$12<=$E3)*$B$2:$B$12)/SUMPRODUCT(($A$2:$A$12>=$D3)*($A$2:$A$12<=$E3))

    EDIT: Other solutions are more elegant!
    Last edited by GaryBarlow; 03-20-2015 at 06:01 AM.

  5. #5
    Registered User
    Join Date
    01-12-2015
    Location
    Manchester
    MS-Off Ver
    2007
    Posts
    17

    Re: Average amount between a date range

    That's great.

    Thank you very much

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,695

    Re: Average amount between a date range

    Glad you got a solution, Rachael - thanks for the rep.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How to get invoice amount with corresponding date range
    By bluelulu in forum Excel General
    Replies: 15
    Last Post: 02-27-2014, 03:58 PM
  2. Replies: 2
    Last Post: 04-28-2013, 02:23 AM
  3. How to match Date and Amount from Sheet1 to Sheet2 with the same Date and Amount?
    By ims0phie in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-23-2013, 06:51 AM
  4. Counting amount incorrect within a date range.
    By grungernelly in forum Excel General
    Replies: 8
    Last Post: 06-08-2009, 06:54 AM
  5. finding last and creating average amount income to date
    By Jerry Kinder in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 03-04-2006, 01:10 PM

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