M
moglione1
Hi All,
I am trying to create a way to auto color a row if it meets a certai
criteria. The criteria is: IF the cell.value is Less than or equal t
-14 (i.e. -14, -15, -16, -17) Then color this row. Please help
The code I currently have is:
Private Sub Colour()
Dim LstFiltRow As Range
Dim LstFiltCol As Range
Dim R As Range
'Sheets(Var).Select
Range("A1").Select
Dim MyCheck
For Each R In Cells.Range("Q2:Q30")
MyCheck = R.Value >= "-14"
If MyCheck = True Then
Cells.Rows(R.Row).Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
End If
Next
Range("A1").Select
End Su
I am trying to create a way to auto color a row if it meets a certai
criteria. The criteria is: IF the cell.value is Less than or equal t
-14 (i.e. -14, -15, -16, -17) Then color this row. Please help
The code I currently have is:
Private Sub Colour()
Dim LstFiltRow As Range
Dim LstFiltCol As Range
Dim R As Range
'Sheets(Var).Select
Range("A1").Select
Dim MyCheck
For Each R In Cells.Range("Q2:Q30")
MyCheck = R.Value >= "-14"
If MyCheck = True Then
Cells.Rows(R.Row).Select
With Selection.Interior
.ColorIndex = 6
.Pattern = xlSolid
End With
End If
Next
Range("A1").Select
End Su