trouble with conditional formatting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to conditionally format any cell over the number 20. But when I
apply my code I get text included. I can't seem to figure out how to eliminat
the formatting from the cells in the range that contain text.

HELP!!!


=================================================
For Each cell In xlRng '.Range("A4:A500")
If cell.Value > 20 And cell.Value Then cell.Interior.ColorIndex = 3
Next
 
For Each cell In Range("A4:A500")
If IsNumeric(cell.Value) And cell.Value > 20 Then _
cell.Interior.ColorIndex = 3
Next


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
If cell.Value > 20 And IsNumeric(cell.Value) Then cell.Interior.ColorIndex = 3
 

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