Sub Coloring_Cells()
For i = 1 To 6
Cells(i + 2, 2).Interior.ColorIndex = i
Next
End Sub
--------------------------------------------------------------
Sub Look_Color()
Dim strColor As String
strColor = InputBox(Prompt:="Color you want to looking for?", _
Title:="COLOR TO SEARCH", Default:="No color")
If strColor = "No color" Or strColor = vbNullString Then
Exit Sub
Else
Select Case strColor
Case "Black", "black", "BLACK"
Application.FindFormat.Interior.ColorIndex = 1
Cells.Find(What:="", after:=[A1], SearchFormat:=True).Activate
Case "White", "white", "WHITE"
Application.FindFormat.Interior.ColorIndex = 2
Cells.Find(What:="", after:=[A1], SearchFormat:=True).Activate
Case "Red", "red", "RED"
Application.FindFormat.Interior.ColorIndex = 3
Cells.Find(What:="", after:=[A1], SearchFormat:=True).Activate
Case "Green", "green", "GREEN"
Application.FindFormat.Interior.ColorIndex = 4
Cells.Find(What:="", after:=[A1], SearchFormat:=True).Activate
Case "Blue", "blue", "BLUE"
Application.FindFormat.Interior.ColorIndex = 5
Cells.Find(What:="", after:=[A1], SearchFormat:=True).Activate
Case "Yellow", "yellow", "YELLOW"
Application.FindFormat.Interior.ColorIndex = 6
Cells.Find(What:="", after:=[A1], SearchFormat:=True).Activate
Case Else
Exit Sub
End Select
End If
End Sub