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

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭
    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

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭
    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.

  • Yes, Mike, this worked. Thank you very much.

    =COUNTIFS({DAX iOS Inventory Model}, CONTAINS("iPhone", (@cell)), {DAX iOS STATUS}, ="DEPLOYED")

  • Mike Wilday
    Mike Wilday ✭✭✭✭✭✭

    You're welcome! Glad I can help you out!

  • Rsteer
    Rsteer ✭✭

    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

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!