# Building a Sum If Statement

Options

I'm trying to build a SumIfs statement that calculates the number of hours by type (Sick, Vacation, Personal) by employee ID. I'm able to do a simple SimIf for the total, but struggling with how to break it down by sick type.

This is the statement I'm using and its resulting in an incorrect argument:

=SUMIFS({Employe Absence Info 4.1.20 Range 1}, =ID647, AND({Employee Absence Info 4.1.20 Range 1}, ="Sick"), {Employee Absence Info 4.1.20 Range 1})

Any help would be appreciated!

Tags:

• ✭✭✭✭✭✭
Options

For SUMIFS, the range to sum actually comes first and then is followed by your range/criteria sets.

=SUMIFS({Range to sum}, {ID Range}, "ID647", {Type Range}, "Sick")

Options

Actually, I was able to fix it, the correct statement is this: =SUMIFS({Employe Absence Info 4.1.20 Range 6}, {Employe Absence Info 4.1.20 Range 1}, =ID647, {Employee Absence Info 4.1.20 Range 1}, ="Sick")

Thank you for your help @Paul Newcome!!

• Options

Also tried this: =SUMIF({Employe Absence Info 4.1.20 Range 1}, =ID647, AND({Employee Absence Info 4.1.20 Range 1}), ="Sick", {Employe Absence Info 4.1.20 Range 6})

• ✭✭✭✭✭✭
Options

For SUMIFS, the range to sum actually comes first and then is followed by your range/criteria sets.

=SUMIFS({Range to sum}, {ID Range}, "ID647", {Type Range}, "Sick")

• Options

Thank you, that is tricky! So I've tried that, and now it's returning a zero value, when it should be producing a total. Here's the formula: =SUMIFS({Employe Absence Info 4.1.20 Range 6}, {Employe Absence Info 4.1.20 Range 1}, ID647, {Employee Absence Info 4.1.20 Range 1}, "Sick")

Any suggestions?

Options

Actually, I was able to fix it, the correct statement is this: =SUMIFS({Employe Absence Info 4.1.20 Range 6}, {Employe Absence Info 4.1.20 Range 1}, =ID647, {Employee Absence Info 4.1.20 Range 1}, ="Sick")

Thank you for your help @Paul Newcome!!

• ✭✭✭✭✭✭
Options

Glad you were able to get it working, and happy to help! 👍️

## Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!