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
- 64K Get Help
- 410 Global Discussions
- 220 Industry Talk
- 459 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 137 Just for fun
- 57 Community Job Board
- 459 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 298 Events
- 37 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!