Highlight Rows

N

Napoleon Vang

Is there a way to program an expression close to... If cell in column E
equals string of text "Pending", select entire row and change background
color/patern to yellow?
 
M

Mike H

Hi,

Conditional formatting. Select the row(s) to which this applies then

Format|Conditional format - Select 'Formula is' from the dropdown and enter
the formula

=$E2="Pending"

Click Format and on the 'Pattern' tab and choose yellow. OK

Note that you should change the 2 to the top row of your selection
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
D

Don Guillett

Sub colorif()
Dim c As Range
For Each c In Range("e1:e21")
If c = "pending" Then c.EntireRow.Interior.ColorIndex = 6
Next c
End Sub
 
N

Napoleon Vang

Helps a great ton!
Though, is there a way to add, at the end of that also
"else, make the row in question the default style"?

I find that after deleting the word "Pending" it remains yellow
 
M

Mike H

I find that after deleting the word "Pending" it remains yellow


I'm more than a little surprised it does that. Try tapping F9, does the
yellow clear?

If it does then calculation is probably set to manual

Tools|Options|Calculation tab and select Automatic
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
N

Napoleon Vang

And also another problem I just discovered.. I am currently using

Tools > CF > =MOD(ROW(),2)=1

to alternate the row colors. and it's not allowing me to highlights the
alternate rows..
 
M

Mike H

Hi,

These 2 conditional formats should not conflict provided

=$E1="Pending"

Is the first CF condition. You then click ADD and enter your second condition.

See my other post about calculation
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
N

Napoleon Vang

Mike.. You are the.. MAN!!! WAHOOOO

Mike H said:
Hi,

These 2 conditional formats should not conflict provided

=$E1="Pending"

Is the first CF condition. You then click ADD and enter your second condition.

See my other post about calculation
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
M

Mike H

You seem to be happy, glad I could help
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 

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