SUMIFS based on multiple columns including a drop down
I'm trying to calculate the expense of rows based on the type of expense and the month it was spent in. I feel like I'm so close on this formula but keep hitting the "UNPARSEABLE" result. Any tips on how to total an amount based on various drop down options?
Best Answer
-
Hmmm... just checked. I think you can actually use an OR statement:
=SUMIFS(Amount:Amount, [Expense Category]:[Expense Category], OR(@cell="Supplies", @cell="Snacks",@cell="Culture"), [Month Number]:[Month Number], 1)
Answers
-
Well, your error is because you can only have one condition for [Expense Category]:[Expense Category] and you're trying to get 3. I'm not sure if you can have an "OR" condition, but you could create a helper column with a column (NewColumn) formula that says:
=IF(OR([Expense Category]@row = "Supplies",[Expense Category]@row = "Snacks",[Expense Category]@row = "Culture"), "Yes","")
Then update your formula to say:
=SUMIFS(Amount:Amount, NewColumn:NewColumn, "Yes", [Month Number]:[Month Number], 1)
Then hide your helper column.
-
Hmmm... just checked. I think you can actually use an OR statement:
=SUMIFS(Amount:Amount, [Expense Category]:[Expense Category], OR(@cell="Supplies", @cell="Snacks",@cell="Culture"), [Month Number]:[Month Number], 1)
-
Thank you @Lucas Rayala !
-
@Dixon, happy to help!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.1K Get Help
- 348 Global Discussions
- 199 Industry Talk
- 427 Announcements
- 4.4K Ideas & Feature Requests
- 133 Brandfolder
- 127 Just for fun
- 127 Community Job Board
- 455 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 282 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!