Option Explicit
Sub ConditionalFormat()
Dim i As Long
Dim j As Integer
Application.ScreenUpdating = False
For i = 2 To 65536
Cells(i, 1).Select
If Cells(i, 1) = "" And Cells(i + 1, 1) = "" Then
Exit Sub
ElseIf Cells(i, 1) = "" Then
Cells(i + 1, 1).Select
Else
For j = 2 To 39
If Cells(i, j).Value >= Cells(i, 41) And Cells(i, j).Value <> 0 Then
Cells(i, j).Interior.ColorIndex = 5
ElseIf Cells(i, j).Value < Cells(i, 41) And Cells(i, j).Value <> 0 Then
Cells(i, j).Interior.ColorIndex = 3
End If
Next j
End If
Next i
Application.ScreenUpdating = True
End Sub