- #1

- 6

- 0

Sub colorcells()

Dim x, n, y, i As Double

Dim strMyVal As String

For n = 1 To 3000

Cells(n, 1).Activate

If Cells(n, 1) <> ("") Then

For x = 1 To 7

If x < 7 Then

Cells(n, x).Activate

ActiveCell.Interior.Color = RGB(252, 213, 180)

End If

If x >= 7 Then

Cells(n, x).Activate

__strMyVal = ActiveCell.Offset(-3, 0).Value__

If strMyVal <> ("") Then

ActiveCell.Interior.Color = RGB(255, 255, 153)

End If

End If

Next x

x = 1

End If

Next n

End Sub