BrandynBlaze
New Member
- Joined
- Sep 20, 2012
- Messages
- 29
Hello, I'm very new to this still and can't figure out why my select case loop isn't working. I just want it to format my headers if they match specific text values two of the cases are shown below for "FEA" and "SUN". When I run the code it only changes the cells to one color, not two different colors, and the cell that comes after the header is what is changing. Ultimately I need to change the colors for 8-10 different headers.
Code:
For i = 0 To LstCol
Header = ActiveCell.Value
MsgBox Header
Select Case Header
Case FEA:
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent2
.TintAndShade = 0.4
.PatternTintAndShade = 0
End With
Case SUN:
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent2
.TintAndShade = 0.599993896298105
.PatternTintAndShade = 0
End With
End Select
ActiveCell.Offset(0, 1).Select
Next i