Hey L_girl - I took another look at put this quick VBA code together, I think this is a little more complete of an example. I'm not as good of a VBA'r as many of the folks on this forum, so if anyone has other suggestions for improving this code then by all means...I'm sure there is a much more effective way to do this but at the very least this should get you started....
Sub ColorIT()
Dim IDnum As Range
'
' Color 6 is Yellow
'
For Each IDnum In Range("a:a")
If IDnum.Value = 1 Then
IDnum.Offset(0, 1).Interior.ColorIndex = 6
ElseIf IDnum.Value = 2 Then
IDnum.Offset(0, 1).Interior.ColorIndex = 6
IDnum.Offset(0, 2).Interior.ColorIndex = 6
ElseIf IDnum.Value = 3 Then
IDnum.Offset(0, 1).Interior.ColorIndex = 6
IDnum.Offset(0, 2).Interior.ColorIndex = 6
IDnum.Offset(0, 3).Interior.ColorIndex = 6
ElseIf IDnum.Value = 4 Then
IDnum.Offset(0, 1).Interior.ColorIndex = 6
IDnum.Offset(0, 2).Interior.ColorIndex = 6
IDnum.Offset(0, 3).Interior.ColorIndex = 6
IDnum.Offset(0, 4).Interior.ColorIndex = 6
ElseIf IDnum.Value = 5 Then
IDnum.Offset(0, 1).Interior.ColorIndex = 6
IDnum.Offset(0, 2).Interior.ColorIndex = 6
IDnum.Offset(0, 3).Interior.ColorIndex = 6
IDnum.Offset(0, 4).Interior.ColorIndex = 6
IDnum.Offset(0, 5).Interior.ColorIndex = 6
End If
Next
End Sub
Have a good day...
Bookmarks