How to make E2 display 'TBA' if B2 contains the word 'TBA' in a formula on Numbers?

Hi there. I am wanting to correct a formula. I would like E2 to say TBA if B2 CONTAINS the word TBA. I thought the star around TBA would do this, but clearly it doesn't. What am I doing wrong?


[Re-Titled by Moderator]

iMac 24″, macOS 15.3

Posted on Feb 24, 2025 5:58 PM

Reply
Question marked as Top-ranking reply

Posted on Feb 25, 2025 12:48 AM

HayleyHatzi wrote:

I thought the star around TBA would do this, but clearly it doesn't.


You were close! The * wildcard will work with COUNTIF:




=IF(COUNTIF(B2,"*TBA*")>0,"TBA","")


You can also use COUNTMATCHES without a wildcard, like this:


=IF(COUNTMATCHES(B2,"TBA")>0,"TBA","")



Replace , with ; in the formulas if your region uses , as a decimal separator.


SG




SG

7 replies
Question marked as Top-ranking reply

Feb 25, 2025 12:48 AM in response to HayleyHatzi

HayleyHatzi wrote:

I thought the star around TBA would do this, but clearly it doesn't.


You were close! The * wildcard will work with COUNTIF:




=IF(COUNTIF(B2,"*TBA*")>0,"TBA","")


You can also use COUNTMATCHES without a wildcard, like this:


=IF(COUNTMATCHES(B2,"TBA")>0,"TBA","")



Replace , with ; in the formulas if your region uses , as a decimal separator.


SG




SG

Feb 24, 2025 11:23 PM in response to HayleyHatzi

Not knowing what you need maybe my proposal is not the right one.




If you just want it to report the TBA text of B2 if it contains it, be it at the beginning, center or end of the string, you could try REGEXEXTRACT.  His formula extracts the searched text from you. Inside IFERROR, if there is no TBA it returns empty


=IFERROR(REGEXEXTRACT(B2;”\bTBA\b";1;);"")


If it doesn't work replace ; with ,

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to make E2 display 'TBA' if B2 contains the word 'TBA' in a formula on Numbers?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.