+ Reply to Thread
Results 1 to 3 of 3

add values based on dates with Month Range

  1. #1
    Forum Contributor
    Join Date
    03-30-2009
    Location
    dublin
    MS-Off Ver
    Excel 2007
    Posts
    104

    add values based on dates with Month Range

    i have a sheet containing invoice dates and values

    i have created a sumproduct function to sum the values based on values within a month.
    i need to create a 2nd function to sum the values for the previous month.
    both of the functions need to perform taking the last day of the month as the control (guide value).
    In the Sample sheet j1:k1, at present show the range for the Month
    I would like j2:k2 to display the sart and end of the Previous Month,
    Also i would like the j1:k1 and J2:K2 cells to Populate automatically, when the Cell value for F2 is changed (always to the last of the Month
    Attached Files Attached Files
    Last edited by bajdr47; 04-07-2010 at 08:02 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885

    Re: add values based on dates with Month Range

    Hi Bajdr,

    Formulas:

    D2: =SUMPRODUCT(($A$2:$A$10<K1)*($A$2:$A$10>J1)*$C$2:$C$10)
    D3: =SUMPRODUCT(($A$2:$A$10<K2)*($A$2:$A$10>J2)*$C$2:$C$10)

    J1: =DATE(YEAR(K1),MONTH(K1),1)
    K1: =F2
    J2: =DATE(YEAR(F2),MONTH(F2)-1,1)
    K2: =DATE(YEAR(J2),MONTH(J2)+1,0)

    Hope that helps!

  3. #3
    Forum Contributor
    Join Date
    03-30-2009
    Location
    dublin
    MS-Off Ver
    Excel 2007
    Posts
    104

    Re: add values based on dates with Month Range

    Hi Paul,

    Many Thanks,

    Perfect solution.

+ 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