Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jun 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    add only if date falls within last year (2003)

    This one is probably easy for the gurus. To simplify, say my sheet only has 2 columns - random dates on the first column, dollar amounts on second column. What I need to add up are ONLY the values from dates within the last year. I tried using IF but really don't know how to get the dates to work. I guess I can have another column to figure out the dates first then my total? As you can tell I'm a newb to this and any help would be appreciated. Thanks!

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: add only if date falls within last year (2003)

    Assuming your dates are in column A and your values are in column B,

    if you meant within the current calendar year, 2008:

    =SUMIF(A2:A100,">"&DATE(2008,1,0),B2:B100)

    but if you meant since one year ago today try:

    =SUMIF(A2:A100,">"&DATE(YEAR(NOW())-1,MONTH(NOW()),DAY(NOW())-1),B2:B100)
    -John ... I float in liquid gardens
    UTC -7ąDS

  3. #3
    New Lounger
    Join Date
    Jun 2008
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: add only if date falls within last year (2003)

    I meant the latter...and YES! That does work!! When I tried doing this, I had to figure out the dates in a different column (how many months it was off by) and then add if the value was less than 12. I would have to hide that column by doing it that way. Yours is great...I can just plug the numbers and have the date calculation within the same cell. Thanks!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •