SUMIF with two conditions and a checkbox
Hi Everyone,
I'm currently trying to come up with a formula using sumif (or sumifs) with multiple conditions. I'm trying to sum the item value of every row in my sheet ONLY IF the patient ID of the rows is the same AND "Fiscal Year 2022" is checked. Currently I'm trying the formula: =SUMIF([Fiscal Year 2022?]@row, 1, [Patient ID]:[Patient ID], [Patient ID]@row, [Item Value]:[Item Value]) with no success.
*There is no identifying info in the attached screenshot!*
Thanks so much!
Best Answer
-
In Holly's first formula, the range for the checkbox value is set to a single row instead of the whole range. Mismatched ranges in a formula will cause the incorrect argument error. Try this one instead:
=SUMIFS([Item Value]:[Item Value], [Fiscal Year 2022?]:[Fiscal Year 2022?], 1, [Patient ID]:[Patient ID], [Patient ID]@row)
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
Answers
-
Hi @emma.blake,
You would need to use SUMIFS if there are multiple criteria.
=SUMIFS([Item Value]:[Item Value], [Fiscal Year 2022?]@row, 1, [Patient ID]:[Patient ID], [Patient ID]@row)
The syntax of sumifs is slightly different than sumif. The range you wish to sum must go first.
Holly Conrad Smith
Director of Technology & Innovation 💡 at Streamline
CliftonStrengths Top 5: Deliberative, Restorative, Achiever, Consistency, Harmony
-
Thank you for your response! I tried this formula, but it returned "Incorrect Argument". Any other suggestions?
Thanks again!
-
Try
=if([Fiscal Year 2022?]@row=1, SUMIFS([Item Value]:[Item Value], [Fiscal Year 2022?]@row, 1, [Patient ID]:[Patient ID], [Patient ID]@row), "")
Holly Conrad Smith
Director of Technology & Innovation 💡 at Streamline
CliftonStrengths Top 5: Deliberative, Restorative, Achiever, Consistency, Harmony
-
In Holly's first formula, the range for the checkbox value is set to a single row instead of the whole range. Mismatched ranges in a formula will cause the incorrect argument error. Try this one instead:
=SUMIFS([Item Value]:[Item Value], [Fiscal Year 2022?]:[Fiscal Year 2022?], 1, [Patient ID]:[Patient ID], [Patient ID]@row)
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
@Jeff Reisman Thank you so much!! This worked perfectly
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.5K Get Help
- 448 Global Discussions
- 145 Industry Talk
- 481 Announcements
- 5.1K Ideas & Feature Requests
- 85 Brandfolder
- 152 Just for fun
- 73 Community Job Board
- 492 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 304 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!