conditional format using "OR"?

  • Thread starter Thread starter Heder
  • Start date Start date
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
 
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)))
 
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
 
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
 
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)))
 
Colour all the cells the colour of the rest and add one CF condition of

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top