0
votes

I'm new to Excel (which I now use for work) and just learning how to implement custom formulas. I'm asking this question specifically in regards to Google Sheets but I tagged Excel in case it also applies there.

I can't share the exact sheet in question because of sensitive information, but I wanted to write a formula that would highlight any row based on whether its cell in column A contained a phrase, such as "apple". So if A2 is "applesauce", A3 is "apples and oranges", and A4 is "sapplease", they should all be highlighted.

I selected my range and wrote this formula in Conditional Formatting > Custom rule is... : =$A2="* apple*" (no space) which did not work.

I found another solution online and used this formula: =FIND("apple", $A:$A) which did work.

Now I am just wondering if someone can explain why the first formula did not work - I've only used wildcards on Excel before, do they not work on Sheets? Or was there something else I was doing wrong?

So far have not been able to find answers with a simple Google search, which is why I posted here - thank you to anyone who can help!

3

3 Answers

2
votes
=SEARCH("apple",$A2)    

Apply to

A2:Z
1
votes

While Excel and Google Sheets have several similar features there are many that that are not available in the other by the other hand the support of wildcards occur in few functions/features but not in all.

In this case conditional formatting on both applications don't support the use wildcards in the form that you intended

=$A2="* apple*" 

The logic is that value of $A2 is being compared with "* apple*" on which * is a character as any other, not a wildcard.

Related Q&A

-1
votes

According this, there are only a limited number of Excel functions that accept wildcards, of which = is not one.