Using OR in Condition Formatting

S

SamuelT

Hi all,

I'm trying to use OR in a piece of condition formatting. Basically,
want a cell to go red if it has either "high" or "red" in it.

I'm using the following formula, but it doesn't seem to work:

=OR("red","high")

Any ideas why this doesn't do what I want?

TIA,

Samuel
 
R

Ron Coderre

You might want to try this:

=OR(A1="RED",A1="HIGH")

Does that help?

Regards,
Ron
 
M

Max

=OR("red","high")

Think the cell reference is missing ..

Assume the CF range is A1:A5

Select A1:A5 (with A1 active),
then apply conditional formatting using the formula:
=OR(A1="red",A1="high")
 
S

SamuelT

Thanks for the advice Rob.

Unfortunately that won't work as there are around 20 cells (dotted
around the spreadsheet) that the formatting needs to be applied to.

SamuelT
 
B

Bob Phillips

It will, just select all 20 cells, A1 first, then apply the formula.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
B

Beege

SamuelT

Try

=OR(A1="red",A1="high")

you might need more conditions to account for all caps or initial caps, etc.

Beege
 
M

Max

Unfortunately that won't work as there are around 20 cells (dotted
around the spreadsheet) that the formatting needs to be applied to.

Shouldn't be a problem. Select A1 (with the CF applied) as suggested, and
double-click on the format painter (brush icon). Then just "paint" over the
20 scattered cells with the brush cursor. Press Esc when done to revert
cursor to normal.
 
R

Ron Coderre

SamuelT

•Select the range that includes the cells with the Conditional
formatting you want to edit.
•Hold down the [Ctrl] key and use the mouse to click one of the cells
with the conditional formatting.
•Edit>Find>[Special Cells...]
•Select "Conditional Formats"
•Select "Same"
•Click [OK]

That will select all of the cells in the range that have the same
conditional formatting as the selected cell.

Then:
•Format>Conditional Formatting
•Set the formula to refer to the selected cell (make sure there are no
dollar signs in the reference. If cell A1, then
=OR(A1="red",A1="high"), NOT =OR($A$1="red",$A$1="high").

When done....all of the selected cells will have the new correct
conditional formatting.

Does that help?

Regards,
Ron
 
Top