veen1981
veen1981

Reputation: 33

Google Sheets - Conditional Formatting Based on a cell containing a specific formula

I have a budget tracking sheet which automatically enters an account number using VLOOKUP from another sheet to match the contract that is being paid. This works perfect 95% of the time. The remaining 5% are instances when the contract is being paid from a different account than the default for one reason or another causing me to have to type over my formula to manually enter the account number. I'm looking for a way to conditionally format these cells. Something like: =IF(E2:E<>"=IFERROR(VLOOKUP(""*"...

I'm not sure if this is even possible, but any direction would be appreciated!

Upvotes: 0

Views: 72

Answers (1)

Marios
Marios

Reputation: 27350

You can check whether your formula contains a particular expression, in this case the word VLOOKUP. Put the follow custom function in the conditional formatting menu:

=isnumber(SEARCH("VLOOKUP",formulatext(A1)))

and this will highlight a cell if the cell A1 contains a vlookup formula.

Feel free to change "VLOOKUP" with another formula text to make it more specific if you will.

enter image description here

Upvotes: 1

Related Questions