N
Nick Thorsch
Hi,
I want visual basic code that will compare the first
cell's value, the goal, to the second cell's value, the
actual value. If the actual is greater than the goal, the
actual cell is filled in green. If the actual is less
than the goal, the actual cell is filled in red. The
process repeats down the two columns, comparing varying
actuals to goals and filling with green or red to create
a clearer managerial dashboard. The code I have created
so far might help get you started. Please post the
correct code. I have spent hours on this in frustration.
If you can solve this, please email it to me and THANK
YOU VERY MUCH!!
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 6/14/2004 by Nick Thorsch
'
'
If "K3" > "L3" Then
With Selection.Interior
.ColorIndex = 4
.Pattern = xlSolid
End With
Else
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
End If
End Sub
I want visual basic code that will compare the first
cell's value, the goal, to the second cell's value, the
actual value. If the actual is greater than the goal, the
actual cell is filled in green. If the actual is less
than the goal, the actual cell is filled in red. The
process repeats down the two columns, comparing varying
actuals to goals and filling with green or red to create
a clearer managerial dashboard. The code I have created
so far might help get you started. Please post the
correct code. I have spent hours on this in frustration.
If you can solve this, please email it to me and THANK
YOU VERY MUCH!!
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 6/14/2004 by Nick Thorsch
'
'
If "K3" > "L3" Then
With Selection.Interior
.ColorIndex = 4
.Pattern = xlSolid
End With
Else
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
End If
End Sub