Why isn't my TBA formula working in Numbers?

Hi there. I have always had a formula that highlights the client to provide information if there is a TBA in the selected cells. I have just noticed it isn't working and I can't work out what is wrong. Originally it was just if the exact word was TBA and then I altered it with "*TBA*" to cover if the selected cells CONTAINS the work TBA. This document doesn't have TBA just the ORANGE CELL = CLIENT TO PROVIDE MISSING INFORMATION is still showing. This should disappear if there is no TBA. Any ideas?

Thanks in advance.



[Re-Titled by Moderator]

iMac 24″

Posted on Apr 2, 2025 9:21 PM

Reply
6 replies
Sort By: 

Apr 3, 2025 1:42 PM in response to HayleyHatzi

By default, wildcard searches are case insensitive, so it could be triggering on the letters 'tba' embed in any other word in the specified range - for example, 'Basketball'


Without seeing the entire range, it's hard to be sure, but you can use Numbers' Find & Replace to look for occurrences of 'tba' anywhere on the sheet.

Reply

Apr 3, 2025 4:38 PM in response to HayleyHatzi

What you really want is a check for the word 'TBA', rather than those three letters anywhere in the text.


For that, you'll need to step up to a regular expression which is kind of like a programmatic way of defining your search term.


You need to replace your "*TBA*" in your formula with:


REGEX(\bTBA\b",1)


It looks weird, but the \b indicates a word boundary, so this looks for 'TBA' as a word on its own, not embedded in another word like 'Basketball". The ,1 at the end tells Numbers to match case-sensitive (you can use ,0 for case-insensitive to match 'tba' if you want.


So, that said, your formula should look like:


=IF(OR(COUNTIF(A2:Q7,REGEX("\bTBA\b",1))>0,COUNTIF(A12:Q18,REGEX("\bTBA\b",1))>0),"ORANGE CELL = CLIENT TO PROVIDE MISSING INFORMATION","")

Reply

Why isn't my TBA formula working in Numbers?

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