SUMIFS Formula Reference Another Sheet

Michelle Maas
Michelle Maas ✭✭✭✭
edited 03/25/24 in Formulas and Functions

I have a budget sheet that I want to pull total monthly expenses from another sheet. The below formula is calculating the total [Health & Safety] spend, but I want it to only calculate expenses for June. I have another column which picks up the month from the date column. I am wondering if it is a SUMIFS formula and I need to add AND, but can't quite figure it out. Appreciate your help.

=SUMIF({Archived Expense Reports Range 1}, "Health & Safety", {Archived Expense Reports Range 2})

Best Answer

  • Paul Newcome
    Paul Newcome ✭✭✭✭✭✭
    Answer ✓

    We can actually reference the Date column directly instead of needing the helper column with the month pulled out.

    =SUMIFS({Archived Expense Reports Range 2}, {Archived Expense Reports Range 1}, "Health & Safety", {Date Column}, IFERROR(MONTH(@cell), 0) = 6)


    The above will take into account all rows where the date is in the month of June. This does not matter which year it is in though. If you wanted to specify the year as well (June of 2021 for example), it would look like this...

    =SUMIFS({Archived Expense Reports Range 2}, {Archived Expense Reports Range 1}, "Health & Safety", {Date Column}, AND(IFERROR(MONTH(@cell), 0) = 6, IFERROR(YEAR(@cell), 0) = 2021))

«1

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!