can i setup if, then statements to change the color of a row

E

Ed

I would like to use if and then statements to recognize P, O, or C
if the cell has P, O, or C I want the row to change colors Blue, Green, Red
Is this possible
 
T

Trevor Shuttleworth

Use Conditional Formatting with the three conditions.

Regards

Trevor
 
G

Gord Dibben

Select a row or range in a row.

Then assuming A1 is the cell with P, O or C

Format>Conditional Formatting>Condtion 1>Formula is

=$A$1="P"

Format as Blue

Add

Condition 2.......=$A$1="O"

etc. for condition 3


Gord Dibben MS Excel MVP
 
E

Ed

The CF works in the cell how do I get to work for the entire? So if I input
"p" the entire row of 10 turns blue?
 
E

Ed

Hey, almost there.

So specifically every cell in column a will change to P, O, or C
How do I format the entire worksheet to do this?
Or how do I copy this format.
 
S

SteveW

Every cell in Row 1 not Column A, will change if A1 is P,O or C
You have to have lock on to $A$1 in the Conditional Format Formula to get
row to change on A1 contents

You'll have to change this to $A1, then copy the format from Row 1 to
any/all rows that you want the same formatting

Steve
 
G

Gord Dibben

Are you saying that Column A cells will have a P, O or C?

If so, select a range of rows and CF>Formula is

=$A1=P...........I misled you in first post by locking just A1

Note the single $ sign to lock just the Column A but not the row.

I wouldn't format the whole worksheet this way.

Just format a couple hundred rows for now and use the Format Painter to copy to
more rows later.


Gord
 

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

Top