SUMIF or SUMIFS (multiple columns and YEAR and MONTH criteria)
Formula Logic (for the formula that would be a column formula for the Jan column - needs to be a single formula):
SUM ([Received Count] if [Date Recd]'s YEAR = 2022 AND MONTH = 1) and also SUM ([Completed Count] if [DateCompleted]'s YEAR = 2022 AND MONTH = 1)
Thank you!
Best Answer
-
My apologies. I misunderstood exactly what you were trying to do.
=IF(AND(YEAR([Date Recd]@row), MONTH([Date Recd]@row) = 1), [Received Count]@row) + IF(AND(YEAR(DateCompleted@row), MONTH(DateCompleted@row) = 1), [Completed Count]@row)
Answers
-
You would use two separate SUMIFS (one for the Received Count and one for the Completed Count) and then add them together.
=SUMIFS(.............) + SUMIFS(...............)
-
Thank you! Getting an incorrect argument set error with this formula I tried:
=SUMIFS([Received Count]@row, [Date Recd]@row, YEAR([Date Recd]@row) = 2022, MONTH([Date Recd]@row) = 1) + SUMIFS([Completed Count]@row, DateCompleted@row, YEAR(DateCompleted@row) = 2022, MONTH(DateCompleted@row) = 1)
-
When you have multiple criteria sets for the same range, you need to wrap them in an AND function like so:
{Range}, AND(criteria_1, criteria_2)
-
=SUMIFS([Received Count]@row, [Date Recd]@row, AND(YEAR([Date Recd]@row) = 2022, MONTH([Date Recd]@row) = 1)) + SUMIFS([Completed Count]@row, DateCompleted@row, AND(YEAR(DateCompleted@row) = 2022, MONTH(DateCompleted@row) = 1))
Formula above doesn't error out anymore, but it's not adding the .5 credits. When Date Received's year = 2022 and Date Received's Month = 1, it should add .5 to the Jan column. When DateCompleted's year = 2022 and DateCompleted's Month = 1, it should add another .5 to the Jan column. So for the Jan column cells above, they should either be .5 or 1 (depending on if Date Recd and DateCompleted are both January 2022 or if only one of them is)
Thank you so much!
-
My apologies. I misunderstood exactly what you were trying to do.
=IF(AND(YEAR([Date Recd]@row), MONTH([Date Recd]@row) = 1), [Received Count]@row) + IF(AND(YEAR(DateCompleted@row), MONTH(DateCompleted@row) = 1), [Completed Count]@row)
-
Added = 2022 after the YEAR sections and it worked! Thank you so much!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63.5K Get Help
- 402 Global Discussions
- 213 Industry Talk
- 450 Announcements
- 4.7K Ideas & Feature Requests
- 141 Brandfolder
- 135 Just for fun
- 56 Community Job Board
- 454 Show & Tell
- 31 Member Spotlight
- 1 SmartStories
- 296 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!