Hi I could use some help with a for loop.
I want to loop through a row and when I hit Saturday and Sunday I want to highlight that column.
I figured out how to do the compare and do the highlighting. I'm now just stuck on the loop.
Here is an example of my data:
Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday,Monday,Tuesday,Wednesday,Thursday, etc
The row that this is on is row 2
Here is the code I have so far:
If Weekday(Range("G2").Value) = 1 Then ' 1 for sunday 7 for saturday
Range("G1:G11").Select
With Selection.Interior 'Change color to Yellow in column
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End If
Next lcell
Thanks again
Bookmarks