1
votes

I'm coloring my list's background with stripped color for visual purpose, using =ISEVEN(ROW()) formula in conditional formatting.

But now I also want some cells in the list to have red text color if it contains +. Problem is each rule tries to format both background and foreground color of a cell, and one rule would precede another.

Is there anyway to instruct a conditional formatting rule to format only background or foreground?

2

2 Answers

0
votes

When you create conditional formatting rules, you can include a fill colour (or not), font colour/style (or not), and much else, for any cells where the condition(s) is met.

So, for your =ISEVEN(ROW()) simply don't include any font colour option in its rule, similarly in your contains + rule, simply don't include any fill settings in its rule

0
votes

I would make an attempt at using a custom formula (within the conditional formatting drop box options) that changes the font colour based on the "+" being present in the cell.

I would use a custom formula such as:

=RegExMatch(A1, "\+")

And then format the conditional formatting to suit your text colour choice.

This should search the cells in the defined column for the "+" and then reassign your desired font colour if the "+" expression is within the cell.

NOTE: The A1 (range) dictates the column that is being scanned and will likely have to be adjusted to suit your need.

ALSO NOTE: The "\" before the "+" symbol is there to signify that the plus symbol is a "special character".

Examples of Regular Expressions