So i have a table in excel with different names. I am trying to parse through the table and depending on the name in each cell, change the cell background color. I tried to use a switch control, but its not working for me as some of the names are being skipped. So all I get it, some cells colored correctly and some cells not colored at all. This is the code
Sub selectAll()
Sheets("Assignments").Activate
Dim cell As Range
For Each cell In Range("D7:X48")
Select Case cell.Text
ct Case cell.Text
Case "John H."
cell.Interior.ColorIndex = 6
Case "Eve J."
cell.Interior.ColorIndex = 4
Case "Sam M."
cell.Interior.ColorIndex = 46
Case "Jeremy E."
cell.Interior.ColorIndex = 46
End Select
Next
End Sub