Filtering with a formula, but stuck
Hello, I'm trying to filter a summary sheet metric using the following formula but I keep getting "NOMATCH" or "UNPARSEABLE" depending on what I move around. The issue seems to be when I add the Country criteria. I want to filter to just United States and Canada:
=SUMIFS([Total employees]:[Total employees], [Country]:[Country], OR(CONTAINS("Canada", @cell),("United States", @cell)), [Department]:[Department], CONTAINS("Customer Fulfillment", @cell), Date:Date, AND(@cell >= DATE(2022, 1, 1), @cell <= DATE(2022, 3, 31)))
The Country column has a column formula applied to it:
=INDEX({Master Location Index - Country Range}, MATCH([Location]@row, {Master Location Index - Location Range}, 0), 0)
I've searched all over the community for examples similar to this and am not coming up with a solution.
Thanks so much for your help!
Best Answer
-
Hey @curiouslearner
A very small tweak to your formula is all that is needed. Both of the terms in your Country OR criteria need the CONTAINS function.
=SUMIFS([Total employees]:[Total employees], [Country]:[Country], OR(CONTAINS("Canada", @cell), CONTAINS("United States", @cell)), [Department]:[Department], CONTAINS("Customer Fulfillment", @cell), Date:Date, AND(@cell >= DATE(2022, 1, 1), @cell <= DATE(2022, 3, 31)))
Will that work for you?
Kelly
Answers
-
Hey @curiouslearner
A very small tweak to your formula is all that is needed. Both of the terms in your Country OR criteria need the CONTAINS function.
=SUMIFS([Total employees]:[Total employees], [Country]:[Country], OR(CONTAINS("Canada", @cell), CONTAINS("United States", @cell)), [Department]:[Department], CONTAINS("Customer Fulfillment", @cell), Date:Date, AND(@cell >= DATE(2022, 1, 1), @cell <= DATE(2022, 3, 31)))
Will that work for you?
Kelly
-
Hi Kelly, thanks so much for your quick reply. I appreciate you!
This did not work initially, but combined with another thread I got it to work. I had to apply an "IFERROR" enclosure to the column formula for Country and combined with your fix above I have it working.
Thanks again.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 63K Get Help
- 380 Global Discussions
- 212 Industry Talk
- 442 Announcements
- 4.6K Ideas & Feature Requests
- 140 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 305 Events
- 34 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!