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
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 495 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!