+ Reply to Thread
Results 1 to 6 of 6

Help with Sumif function with multiple crieteria

  1. #1
    Registered User
    Join Date
    01-19-2012
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Help with Sumif function with multiple crieteria

    I am new to the forum and need some help with a sumif function. I am attempting to take a date, see if it is in a list of dates, if so, return the sum of the values 60 days before and 60 days after that date in two separate columns. The date changes along with the data fields. Please help. Thanks.
    Attached Files Attached Files
    Last edited by greenbean0021; 01-19-2012 at 10:18 AM. Reason: Added attachment

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,644

    Re: Help with Sumif function with multiple crieteria

    Please, upload example workbook and write where you want your result.

  3. #3
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Help with Sumif function with multiple crieteria

    Hi,

    I imagine the dates in row 2 (from column B to DC) and the numbers to be summed below (rows 2-1000).

    The date to compare +60 -60 (the formula subtracts two months) in A2

    Please Login or Register  to view this content.
    Maybe if you upload a sample file, you'll receive a more tailored solution.

    Regards


    Edit: Sorry Zbor, did not mean to overlap. Regards
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,644

    Re: Help with Sumif function with multiple crieteria

    You didn't overlap. Great if it works. I just was to lazy for delimiting data :D

  5. #5
    Registered User
    Join Date
    01-19-2012
    Location
    Michigan, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Help with Sumif function with multiple crieteria

    Thanks for your help, but when i use this string, I get a product that's a date, not 7 the answer for 60 days before, and 9 for 60 days after. not sure what's going on. Thanks.

    Hi,

    I imagine the dates in row 2 (from column B to DC) and the numbers to be summed below (rows 2-1000).

    The date to compare +60 -60 (the formula subtracts two months) in A2

    =SUMPRODUCT((C2:DC2>=DATE(YEAR(A2),MONTH(A2)-2,DAY(A2)))*(C2:DC2<=DATE(YEAR(A2),MONTH(A2)+2,DAY(A2)))*C3:DC1000)

    Maybe if you upload a sample file, you'll receive a more tailored solution.

    Regards


    Edit: Sorry Zbor, did not mean to overlap. Regards[/QUOTE]

  6. #6
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Help with Sumif function with multiple crieteria

    Hi,

    try to format the cell with the formula as number ( or just press together control+shift+!).

    I hope to have undertsood your problem.

    Regards

+ 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