if cell colored in red and not between two numbers then highlight the row......

A

amorrison2006

Hi everything,

My subject pretty much sums up what I need a macro to do,

I need it to look down a column at the red cells only and if it finds
a red cell that is not been -100000 and 100000 then highlight the
entire row blue.

Is this possible?

I hope someone can help

thanks so much in advance,

Andrea
 
G

Guest

Since you did not mention what column the data is in I am using A for my
example

Sub Colormycell()

Dim iLastRow As Integer
iLastRow = Range("A65536").End(xlUp).Row

For i = 1 To iLastRow
If Cells(i, 1).Interior.ColorIndex = 3 And Cells(i, 1).Value > 100000 Or
Cells(i, 1).Value < -100000 Then
Cells(i, 1).EntireRow.Interior.ColorIndex = 5
End If
Next i


End Sub
Michael Arch
 

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