conditional format using "OR"?

H

Heder

I have a set of data, there are a few possible entries:

S
V
A
P
E [NUMBER]
T [NUMBER]
A [NUMBER]

I would like to have the S, V, and P cells all be one colour and the rest be
another colour. How would I define the conditional formatting to make this
work?

thanks
 
T

Tim879

This function will return true when you have S, V or P in the target
cell (i.e. A1 in the example below)

=NOT(ISERROR(MATCH(UPPER(A1),{"S","V","P"},1)))
 
M

M Kan

In the conditional formatting dialog box, select Formula Is and use:

=OR(E46="S",E46="V",E46="A") for the first condition and

=NOT(OR(E46="S",E46="V",E46="A")) for the second
 
P

Pete_UK

Assume those cells are in column A starting with A1. Highlight all the
cells with A1 as the active cell, then click on Format | Conditional
Formatting and choose Formula Is rather than Cell Value Is. Put this
formula in the next box:

=AND((LEN(A1)=1,A1<>"A")

Then click the Format button and choose your colour, then OK your way
out. Set a normal format colour for all the cells.

Hope ths helps.

Pete
 
B

Bob Phillips

You cannot have array constants in conditional formatting.


--
__________________________________
HTH

Bob

This function will return true when you have S, V or P in the target
cell (i.e. A1 in the example below)

=NOT(ISERROR(MATCH(UPPER(A1),{"S","V","P"},1)))
 
B

Bob Phillips

Colour all the cells the colour of the rest and add one CF condition of

=OR(A2="S",A2="V",A2="P")
 
Top