Search code examples
google-sheetssumgoogle-sheets-formulasumifs

Google Spreadsheet - SUMIF Date Range


I'm trying to create a spreadsheet, in which I want to sum the table if records are older than 1 year.

I have inventory in 1 sheet with purchase date and other stuff, and in 2nd sheet, I want to sum the inventory which is older than 1 year (inspection date is a separate column in 2nd sheet)


Solution

  • sum B column older than year:

    =SUMIF(A2:A, ">"&DATE(YEAR(TODAY())-1, MONTH(TODAY()), DAY(TODAY())), B2:B)
    

    0


    sum stuff between two dates:

    =SUMIFS(B2:B, 
     A2:A, ">"&DATE(YEAR(TODAY())-1, MONTH(TODAY()), DAY(TODAY())), 
     A2:A, "<="&TODAY())
    

    0