+ Reply to Thread
Results 1 to 6 of 6

Help with Sum(if or SUMIFS

  1. #1
    Registered User
    Join Date
    11-19-2009
    Location
    WI
    MS-Off Ver
    Excel 2007
    Posts
    22

    Help with Sum(if or SUMIFS

    OK, so this is my problem. I need to be able to add up the values in column C if the values in column A meet two criteria which are driven by values in column B. Below is one formula I was trying to use but I get an #VALUE!. Column E has the actual result that I’m hoping to get from the formula. Any ideas on how to do this? File is attached.

    I'm on 2007

    {=SUM(IF(AND(A:A>B17-365,A:A<B18-365),C:C,"-"))}
    Attached Files Attached Files
    Last edited by arangoa79; 06-24-2010 at 01:23 PM.

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

    Re: Help with Sum(if or SUMIFS

    This maybe?

    =SUMIFS(C:C, A:A, ">"&A18-365, A:A, "<"&B19-365)

  3. #3
    Registered User
    Join Date
    11-19-2009
    Location
    WI
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Help with Sum(if or SUMIFS

    That worked thank you so much. Now another question the reason I use the -365 is because I want to turn, lets say 1/15/2009 in to 1/15/2008. The problem with using -365 is that I end up with 1/16/2008. Is there a way to calculate a current date to the exact date in an earlier year? Make sense?

  4. #4
    Forum Contributor day92's Avatar
    Join Date
    04-20-2010
    Location
    Los Angeles
    MS-Off Ver
    Excel 360
    Posts
    600

    Re: Help with Sum(if or SUMIFS

    Im not sure I follow the logic in Column E. Where does the 112 come from in E19?

    None the less - try this formula..

    =SUM(IF(A:A>B17-365,IF(A:A<B18,C17,"")))

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

    Re: Help with Sum(if or SUMIFS

    First, I made mistake putting A18 instead of B18...

    For second question look this:

    =SUMIFS(C:C,A:A, ">"&DATE(YEAR(B18)-1,MONTH(B18),DAY(B18)),A:A, "<"&DATE(YEAR(B19)-1,MONTH(B19),DAY(B19)))

  6. #6
    Registered User
    Join Date
    11-19-2009
    Location
    WI
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Help with Sum(if or SUMIFS

    Excellent, that worked. Great forum, thank you.

+ 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