Im coloring column D based off of the letter in column A. I want to move or copy D after it is colored to a location based of days of the week in column B. would also love for the moved cell to spread out until the return day.
Sub COLOR()
'color based on sdc
Range("A2").Select
Do Until IsEmpty(ActiveCell.Value)
DoEvents
If ActiveCell.Value = "s" Then
ActiveCell.Offset(0, 3).Interior.ColorIndex = 40
ActiveCell.Offset(1, 0).Activate
End If
If ActiveCell.Value = "d" Then
ActiveCell.Offset(0, 3).Interior.ColorIndex = 6
ActiveCell.Offset(1, 0).Activate
End If
If ActiveCell.Value = "c" Then
ActiveCell.Offset(0, 3).Interior.ColorIndex = 35
ActiveCell.Offset(1, 0).Activate
End If
If ActiveCell.Value = "" Then
ActiveCell.Offset(1, 3).Activate
End If
Loop
Application.ScreenUpdating = True
End Sub
Type | DAY OUT | DAY IN | whole puzzle piece | SA AM | SA PM | SU AM | SU PM | MO AM | MO PM | TU AM | TU PM | WE AM | WE PM | TH AM | TH PM | FR AM | FR PM | SA AM | SA PM | |
c | WE | FR | 08:00 8398183 qual/petrk/coun/ 14:00 | 08:00 8398183 qual/petrk/coun/ 14:00 |
Sub COLOR()
'color based on sdc
Range("A2").Select
Do Until IsEmpty(ActiveCell.Value)
DoEvents
If ActiveCell.Value = "s" Then
ActiveCell.Offset(0, 3).Interior.ColorIndex = 40
ActiveCell.Offset(1, 0).Activate
End If
If ActiveCell.Value = "d" Then
ActiveCell.Offset(0, 3).Interior.ColorIndex = 6
ActiveCell.Offset(1, 0).Activate
End If
If ActiveCell.Value = "c" Then
ActiveCell.Offset(0, 3).Interior.ColorIndex = 35
ActiveCell.Offset(1, 0).Activate
End If
If ActiveCell.Value = "" Then
ActiveCell.Offset(1, 3).Activate
End If
Loop
Application.ScreenUpdating = True
End Sub