SUM if a condition is met
Hello Community,
l browsed around and couldn't find a solution that would apply to my issue. I am trying to sum the total amount per district code. Important note is that a troubleshooter can work any of the districts so l need to leave the grouping per Troubleshooter but sum up the totals per District.
So far l have used the following and getting the #UNPARSEABLE error:
=SUMIF([SES Net Value]:[SES Net Value], [District Code]:[District Code], CONTAINS("OC")@row)
=SUM([SES Net Value]:[SES Net Value], [District Code]:[District Code], CONTAINS("OC")@row)
Help!?
Best Answer
-
Hey @Silvia Rangel
You are on the right track with SUMIFS. The UNPARSEABLE is because the syntax is not correct within the CONTAINS function nor is it correct for SUMIF (singular). The good news is that you do not need the CONTAINS function since "OC" is your whole word, not part of a word (for example if you were trying to find instances of octet, octets, and octopus- these entries all CONTAIN "OC") and your current syntax IS correct for the much more versatile SUMIFS function.
=SUMIFS([SES Net Value]:[SES Net Value], [District Code]:[District Code], "OC")
Will this work for you?
Kelly
Answers
-
Hey @Silvia Rangel
You are on the right track with SUMIFS. The UNPARSEABLE is because the syntax is not correct within the CONTAINS function nor is it correct for SUMIF (singular). The good news is that you do not need the CONTAINS function since "OC" is your whole word, not part of a word (for example if you were trying to find instances of octet, octets, and octopus- these entries all CONTAIN "OC") and your current syntax IS correct for the much more versatile SUMIFS function.
=SUMIFS([SES Net Value]:[SES Net Value], [District Code]:[District Code], "OC")
Will this work for you?
Kelly
-
@Kelly Moore Thanks for explaining it so well, it works!!!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 380 Global Discussions
- 213 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 450 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 306 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!