» Conditonal Formatting using Microsoft Excel VBA
The tip submitted by Makati, Philippines
Private Sub cmdResult_Click()
Dim atnt As Double
Dim ave As Double
Dim min As Double
Dim max As Double
For i = 6 To 9
If IsNumeric(Worksheets("sheet1").Cells(i, 2)) And IsNumeric(Worksheets("sheet1").Cells(i, 3))_
And IsNumeric(Worksheets("sheet1").Cells(i, 4)) And IsNumeric(Worksheets("sheet1").Cells(i, 5))_
Then
If Trim(Worksheets("sheet1").Cells(i, 2)) <> "" And Trim(Worksheets("sheet1").Cells(i, 3)) <> "" And_
Trim(Worksheets("sheet1").Cells(i, 4)) <> "" And Trim(Worksheets("sheet1").Cells(i, 5)) <> "" Then
atnt = Worksheets("sheet1").Cells(i, 2)
ave = Worksheets("sheet1").Cells(i, 3)
min = Worksheets("sheet1").Cells(i, 4)
max = Worksheets("sheet1").Cells(i, 5)
If (atnt > ave) And (atnt > min) And (atnt > max) Then
Range("F" & i).Select
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
ElseIf (atnt < ave) And (atnt < min) And (atnt < max) Then
Range("F" & i).Select
With Selection.Interior
.ColorIndex = 4
.Pattern = xlSolid
End With
ElseIf (atnt > ave) And (atnt < max) Then
Range("F" & i).Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
End If
End If
End If
Next i
End Sub

Book Store:
Recommended Books:
- AWAKEN THE GIANT WITHIN : HOW TO TAKE IMMEDIATE CONTROL OF YOUR MENTAL, EMOTIONAL, PHYSICAL AND FINANCIAL
- Millionaire Real Estate Mentor : The Secrets of Financial Freedom through Real Estate Investing
- Marketing Plans
- Investments + S&P Card + Powerweb + StockTrak discount coupon
- East of Eden (Oprah's Book Club)
- Marketing Planning for Services

