sumif date range, category, and total amount

Cindi Meche
Cindi Meche ✭✭✭
edited 07/08/24 in Formulas and Functions

Hi! I need to total up a dollar amount spent with a date range (monthly), and that matches a category name.

Can anyone help with a starting point formula for me to work with?

=SUMIF({Smartsheet Range 1}, "Digital Advertising", {Smartsheet Range 2}, {Smartsheet Range 3}, >=DATE(2024, 7, 31), {Smartsheet Range 3}, <=DATE(2024, 7, 1))

I get "Incorrect Argument"

Thanks!
Cindi

Tags:

Best Answer

  • Carson Penticuff
    Carson Penticuff ✭✭✭✭✭✭
    Answer βœ“

    Is {Smartsheet Range 3} the column you would like to sum? The documentation for SUMIF vs SUMIFS is a little confusing. For SUMIF, the range you want to sum should be listed last. For SUMIFS, it should be listed first. I also wouldn't worry about trying to put the month and year inside an AND statement.

    =SUMIFS({Smartsheet Range 3}, {Smartsheet Range 1}, "Digital Advertising", {Smartsheet Range 2}, MONTH(@cell) = 7, {Smartsheet Range 2}, YEAR(@cell) = 2024)

Answers

  • Cindi Meche
    Cindi Meche ✭✭✭
    edited 07/08/24
  • Carson Penticuff
    Carson Penticuff ✭✭✭✭✭✭

    This would give you the total amount spent during the month of June 2024 in the produce category.

    =SUMIFS([Spent]:[Spent], [Order Date]:[Order Date], MONTH(@cell) = 6, [Order Date]:[Order Date], YEAR(@cell) = 2024, [Category]:[Category], "Produce")

  • Cindi Meche
    Cindi Meche ✭✭✭
    edited 07/08/24

    OK, so I am trying to incorporate your info @Carson Penticuff…

    =SUMIFS({SmartsheetΒ Range 1}, "Digital Advertising", AND({SmartsheetΒ  Range 2}) MONTH(@cell) = 7, ({SmartsheetΒ Range 2}) YEAR(@cell) =2024, {SmartsheetΒ Range 3})

    I get "#UNPARSABLE"

    What am I still missing?

  • Carson Penticuff
    Carson Penticuff ✭✭✭✭✭✭
    Answer βœ“

    Is {Smartsheet Range 3} the column you would like to sum? The documentation for SUMIF vs SUMIFS is a little confusing. For SUMIF, the range you want to sum should be listed last. For SUMIFS, it should be listed first. I also wouldn't worry about trying to put the month and year inside an AND statement.

    =SUMIFS({Smartsheet Range 3}, {Smartsheet Range 1}, "Digital Advertising", {Smartsheet Range 2}, MONTH(@cell) = 7, {Smartsheet Range 2}, YEAR(@cell) = 2024)

  • Cindi Meche
    Cindi Meche ✭✭✭

    Thank you for your help, @Carson Penticuff! That did the trick!

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!