VBA code to loop through a range of cells and highlight the cells with a value greater than 10


 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

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.