How can I sum the value of certain criteria within a date range in a separate smartsheet?
I need to calculate the time spent on the team's activities in the past month for my monthly reports, I use a separate Summary Smartsheet to gather all the reporting information. So I am trying to add the Time/Hours spent on each of the Activity items within the last month - making sure that the date calculation doesn't break as the year changes
I have tried this formula: =SUMIFS({Copy of PS Activity - New Range 1}, {Copy of PS Activity - New Range 2}, "Support - remote", {Copy of PS Activity - New Range 4}(MONTH(TODAY()=1,12,MONTH(TODAY())-1),IFERROR((YEAR(@cell),0)=IF(MONTH(TODAY())=1,YEAR(TODAY())-1,YEAR(TODAY())))) - where Range 1 is Time/Hours, Range 2 is Activity and Range 4 is Date of Activity but I am getting unparseable. Where am I going wrong?
Best Answer
-
Previous month would look something like this:
=SUMIFS({Copy of PS Activity - New Range 1}, {Copy of PS Activity - New Range 2}, "Support - remote", {Copy of PS Activity - New Range 4}, AND(IFERROR(MONTH(@cell), 0) = IF(MONTH(TODAY()) = 1, 12, MONTH(TODAY()) - 1), IFERROR(YEAR(@cell), 0) = IF(MONTH(TODAY()) = 1, YEAR(TODAY()) - 1, YEAR(TODAY()))))
Answers
-
Previous month would look something like this:
=SUMIFS({Copy of PS Activity - New Range 1}, {Copy of PS Activity - New Range 2}, "Support - remote", {Copy of PS Activity - New Range 4}, AND(IFERROR(MONTH(@cell), 0) = IF(MONTH(TODAY()) = 1, 12, MONTH(TODAY()) - 1), IFERROR(YEAR(@cell), 0) = IF(MONTH(TODAY()) = 1, YEAR(TODAY()) - 1, YEAR(TODAY()))))
-
That worked perfectly, thanks Paul, a ⭐ as always!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 434 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!