Hi Helen,
I modified the code to color only H2 , I2 , L2 and M2... for last condition...
Sub xformat()
Do While ActiveCell.Value <> ""
If ActiveCell.Value = 1 Then
Range(Cells(ActiveCell.Row, 8), Cells(ActiveCell.Row, 13)).Interior.ColorIndex = 3
ElseIf ActiveCell.Value = 2 Then
Range(Cells(ActiveCell.Row, 8), Cells(ActiveCell.Row, 13)).Interior.ColorIndex = 8
ElseIf ActiveCell.Value = 3 Then
Range(Cells(ActiveCell.Row, 8), Cells(ActiveCell.Row, 13)).Interior.ColorIndex = 4
ElseIf ActiveCell.Value = 5 Then
Range(Cells(ActiveCell.Row, 8), Cells(ActiveCell.Row, 9)).Interior.ColorIndex = 46
Range(Cells(ActiveCell.Row, 12), Cells(ActiveCell.Row, 13)).Interior.ColorIndex = 46
Else
ActiveCell.Interior.ColorIndex = xlNone
End If
ActiveCell.Offset(1, 0).Activate
Loop
End Sub
To run the code u can place the cursor anywhere in column P and run the macros...
It will format anything from that row to down (end)
Bookmarks