简体   繁体   中英

Conditional formatting based on formula

Is there a way to change the text or background color of the cell if that cell contains formula? Ideally I'd like to change text to blue if cell is referencing other cells (similarly to HTML where links are in different color).

You can add conditional formatting rules for this:

Conditional Formatting -> use a formula to determine which cells to format

Then add either:

=ISFORMULA(A1)

or

=LEFT(FORMULATEXT(A1),1) = "="

And apply to whichever range you want. Make sure A1 is not entered as $A$1.

You would then set the font to blue associated with the rule or the fill.

There are probably other ways as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM