SUMIF multi-condition syntax
a Coworker and I have been banging our heads on this one for a couple weeks now for a project under development.
We're trying to SUM hours {TotalTime} within a date range that meets a label criteria (@cell, Month16). It actually works until I add the AND condition. Below is my #INCORRECT AURGUMENT SET
=SUMIF({Activity}, HAS(@cell, Month16), {Date}, AND(@cell >= DATE(2022, 1, 1), @cell <= DATE(2022, 1, 31), {TotalTime}))
Any ideas?
Answers
-
To have multiple range/criteria sets, you need to use a SUMIFS (with the "S" on the end). Keep in mind that the function does have a different syntax from the SUMIF function.
You also have a misplaced parenthesis. One of them on the end should be moved to immediately after the second date function closing so that you close off the AND function before moving on to the next portion of the SUMIF/S.
-
I was afraid you were going to say that 😂
Thank you @Paul Newcome , I'll have at it
-
It should end up looking like this:
=SUMIFS({Total Time}, {Activity}, HAS(@cell, Month16), {Date}, AND(@cell >= DATE(2022, 1, 1), @cell <= DATE(2022, 1, 31)))
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.4K Get Help
- 364 Global Discussions
- 200 Industry Talk
- 428 Announcements
- 4.4K Ideas & Feature Requests
- 137 Brandfolder
- 129 Just for fun
- 128 Community Job Board
- 446 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 283 Events
- 35 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!