Hi,
I have this piece of code that checks the value in B10 then formats (shades) a range of cells B11 to B44.
How do I do it for other columns. For example:
Shade B11 to B44 based on value in B10, Shade C11 to C44 based on value in C10 ..... Shade CZ11 to CZ44 based on value in CZ10.
Also, how do I get the code to run only when the cell A1 changes.
Can anyone help??
Thanks
Bungra
I have this piece of code that checks the value in B10 then formats (shades) a range of cells B11 to B44.
How do I do it for other columns. For example:
Shade B11 to B44 based on value in B10, Shade C11 to C44 based on value in C10 ..... Shade CZ11 to CZ44 based on value in CZ10.
Also, how do I get the code to run only when the cell A1 changes.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$B$10" Then
Set Rng = Range("B11:B44")
Select Case UCase(Target.Value)
Case "1":
Rng.Interior.ColorIndex = 15
Case "7":
Rng.Interior.ColorIndex = 15
End Select
End If
End Sub
Can anyone help??
Thanks
Bungra