andio
andio

Reputation: 1778

Google spreadsheet : conditional format to check if the formula in the cell contains specific syntax

Can i check if the formula in the cell contains specific syntax ?

for example :

I want to use conditional formatting , so if the formula in the cell contains the syntax "if($B$6=", i want to make the font color to red.

Is it possible ?

Upvotes: 1

Views: 109

Answers (1)

Tom Sharpe
Tom Sharpe

Reputation: 34370

Yes, you can use FORMULATEXT to convert the formula into a string, so custom formula is:

=isnumber(SEARCH("if($B$6=",formulatext(A2)))

enter image description here

Font colour can be done the same way.

enter image description here

Upvotes: 2

Related Questions