Alternative to COUNTIF with HAS Formula
I need help, please :)
On a support sheet, I have a list of Zip codes and the areas of the city they correspond to. On my main sheet, I have a "Company HQ Address" column, that contains the Zip code, but NOT on its own column, it's listed within the cell containing the full address. When I use "=COUNTIF({Source Sheet Range 2}, HAS(@cell, "89148")) for example; it only counts it if the cell on the address column lists the Zip code without additional data, which won't work for me.
Ultimately, I want to count the number of rows/records I have per area of the City (North West, North Central, North East, South West, South East). Any ideas on how to fix my formula above, or any other/better way to do this that I am unaware of?
Thank you so much in advance!
Best Answer
-
Hi Barbara. HAS requires an exact match. Switch to using CONTAINS instead.
=COUNTIF({Source Sheet Range 2}, CONTAINS("89148", @cell))
CONTAINS is formatted a little differently so you'll need to put what to search for before where to search at.
Answers
-
Hi Barbara. HAS requires an exact match. Switch to using CONTAINS instead.
=COUNTIF({Source Sheet Range 2}, CONTAINS("89148", @cell))
CONTAINS is formatted a little differently so you'll need to put what to search for before where to search at.
-
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!