Contains formula not picking up text
Hi,
I have this contains formula that searches for M&E and im not sure why its not working.
Could someone please point me to where im going wrong.
Thanks,
Liam
Best Answer
-
The problem is with the range portion of the CONTAINS function. Try using "@cell" exactly as I have it.
=COUNTIFS([Primary Column]1:[Primary Column]5, CONTAINS("M&E", @cell))
@cell tells the formula to look across the previously specified range and evaluate on a cell by cell basis. When you specify "[Primary Column]1" in that portion, you are telling the CONTAINS function to only look at [Primary Column]1 instead of the entire range already established.
Answers
-
Try this instead:
=COUNTIFS([Primary Column]1:[Primary Column]5, CONTAINS("M&E", @cell))
-
Hi Paul,
Unfortunately that didn't work for me.
Liam
-
I tested, and it worked for me. Can you provide the EXACT formula that shows what you updated?
-
=COUNTIFS([Primary Column]1:[Primary Column]5, CONTAINS("M&E", [Primary Column]1))
I used the one you provided.
-
The problem is with the range portion of the CONTAINS function. Try using "@cell" exactly as I have it.
=COUNTIFS([Primary Column]1:[Primary Column]5, CONTAINS("M&E", @cell))
@cell tells the formula to look across the previously specified range and evaluate on a cell by cell basis. When you specify "[Primary Column]1" in that portion, you are telling the CONTAINS function to only look at [Primary Column]1 instead of the entire range already established.
-
Ah yeah, thank you for your help, this works great :)
-
Happy to help! 👍️
Please don't forget to flag the most appropriate response(s) as "helpful". This way others looking for a similar solution can know that one may be found here.
-
I have accepted the answer and clicked on the insightful option but there is no "helpful" option when i click on the flag.
-
It may have been updated. It used to be that it asked if the question was "helpful" and that is what flagged it as "Accepted". I had typed that up before I got the notification that you had accepted the answer, so you ended up getting it anyway. Haha.
Either way... Feel free to come back to the Community if you have anymore questions!
-
Haha, no worries, thanks will do :)
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!