G
Guest
Hi -
I use the following to change the background color of a cell. Is worksheet_change triggered with changes in a value returned by a vlookup? My worksheet does not update until I go into the individual cell and update the forumla, then the color changes. How would I use this function? Please help
Thanks, Ada
Private Sub Worksheet_Change(ByVal Target As Range
Dim Num As Lon
Dim rng As Rang
Dim vRngInput As Varian
Set vRngInput = Intersect(Target, Range("C:C,I:I,O:O,U:U,AA:AA,AG:AG")
If vRngInput Is Nothing Then Exit Su
For Each rng In vRngInpu
'Determine the colo
Select Case rng.Valu
Case Is = "T-1": Num = 6 'yello
Case Is = "T-2": Num = 10 'gree
Case Is = "T-3": Num = 5 'blu
Case Is = "SALE": Num = 3 're
Case Is = 5: Num = 46 'orang
End Selec
'Apply the colo
rng.Interior.ColorIndex = Nu
Next rn
End Sub
I use the following to change the background color of a cell. Is worksheet_change triggered with changes in a value returned by a vlookup? My worksheet does not update until I go into the individual cell and update the forumla, then the color changes. How would I use this function? Please help
Thanks, Ada
Private Sub Worksheet_Change(ByVal Target As Range
Dim Num As Lon
Dim rng As Rang
Dim vRngInput As Varian
Set vRngInput = Intersect(Target, Range("C:C,I:I,O:O,U:U,AA:AA,AG:AG")
If vRngInput Is Nothing Then Exit Su
For Each rng In vRngInpu
'Determine the colo
Select Case rng.Valu
Case Is = "T-1": Num = 6 'yello
Case Is = "T-2": Num = 10 'gree
Case Is = "T-3": Num = 5 'blu
Case Is = "SALE": Num = 3 're
Case Is = 5: Num = 46 'orang
End Selec
'Apply the colo
rng.Interior.ColorIndex = Nu
Next rn
End Sub