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
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!