J
Johnb34
Just getting started with Visual Basic.
I have a sinple worksheet. Cell B1 contains the formula: "SUM(A1:A5).
The Macro is:
Sub ConditionalBkgChg()
If Range("B1") < 5 Then
Range("B1").Select
Selection.Interior.ColorIndex = xlNone
Range("A1").Select
Else
Range("B1").Select
Selection.Interior.ColorIndex = 46
Range("A1").Select
End If
End Sub
If B1 is 5 or greater then the background color turns red.
The Macro works but... I have to run the macro manually after changing the
values. How can I make the macro run continuously?
Thanks
Johnb3
I have a sinple worksheet. Cell B1 contains the formula: "SUM(A1:A5).
The Macro is:
Sub ConditionalBkgChg()
If Range("B1") < 5 Then
Range("B1").Select
Selection.Interior.ColorIndex = xlNone
Range("A1").Select
Else
Range("B1").Select
Selection.Interior.ColorIndex = 46
Range("A1").Select
End If
End Sub
If B1 is 5 or greater then the background color turns red.
The Macro works but... I have to run the macro manually after changing the
values. How can I make the macro run continuously?
Thanks
Johnb3