Joker or wildcard in a formula
Is there a way to include a yoker or wildcart in a formula? I want to count how many iPhones I have, but I don't care if they are IPhone 7, 8 or 9.
How can I tell the formula to only look for IPhone, but ignore if there are additional characters in the field?
Thanks so much
Best Answer
-
You can try using Contains.
=COUNTIFS([column name]:[column name], CONTAINS("Iphone", @cell))
Just replace [Column Name] with the name of your column. If it has spaces or ends in a number then the column name should be wrapped with the brackets, if not, just put in the column name.
This will look at each cell in the range and see if it contains the word Iphone and count it.
Answers
-
You can try using Contains.
=COUNTIFS([column name]:[column name], CONTAINS("Iphone", @cell))
Just replace [Column Name] with the name of your column. If it has spaces or ends in a number then the column name should be wrapped with the brackets, if not, just put in the column name.
This will look at each cell in the range and see if it contains the word Iphone and count it.
-
Yes, Mike, this worked. Thank you very much.
=COUNTIFS({DAX iOS Inventory Model}, CONTAINS("iPhone", (@cell)), {DAX iOS STATUS}, ="DEPLOYED")
-
You're welcome! Glad I can help you out!
-
Similar to "Contains", there's also the "Find" function:
FIND( "iphone" text_to_search [ start_position ]) If it returns a positive integer, the string or cell contains "iphone". Use in a conditional statement.
This will be useful if you need to go cell by cell to compute something in column Y based on Column X.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 439 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 67 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!