Sub HighlightCells()
Dim cell As Range
For Each cell In Range("A1:A10")
If cell.Value > 10 Then
cell.Interior.ColorIndex = 6
End If
Next cell
End Sub
VBA code to loop through a range of cells and highlight the cells with a value greater than 10
Dim cell As Range
For Each cell In Range("A1:A10")
If cell.Value > 10 Then
cell.Interior.ColorIndex = 6
End If
Next cell
End Sub