JessicaG0104
New Member
- Joined
- Oct 26, 2016
- Messages
- 1
I have created a spreadsheet of about 80 or so tabs. On each individual spreadheet, in a specific cell, I have a percentage that is populated. In another cell I have the "IF" formula to populate OFF TRACK or ON TRACK based on what the percentage is. I used this formula in the macro view code:
Private Sub Worksheet_Change(ByVal Target As Range)
'Updateby Extendoffice 20160930
If Target.Address = "$K$12" Then
Select Case Target.Value
Case "OFF TRACK"
Me.Tab.Color = vbRed
Case "ON TRACK"
Me.Tab.Color = vbGreen
Case Else
Me.Tab.Color = vbBlue
End Select
End If
End Sub
This formula does work, but every time I go into each spreadsheet, I need to double click into the cell K12 and push enter to re-enter the IF formula to update the tab color. Is there a way to do this automatically or is something wrong with my coding? I have tried F9, alt + F9; a lot of things but I am open to trying anything else.
Thanks!
Private Sub Worksheet_Change(ByVal Target As Range)
'Updateby Extendoffice 20160930
If Target.Address = "$K$12" Then
Select Case Target.Value
Case "OFF TRACK"
Me.Tab.Color = vbRed
Case "ON TRACK"
Me.Tab.Color = vbGreen
Case Else
Me.Tab.Color = vbBlue
End Select
End If
End Sub
This formula does work, but every time I go into each spreadsheet, I need to double click into the cell K12 and push enter to re-enter the IF formula to update the tab color. Is there a way to do this automatically or is something wrong with my coding? I have tried F9, alt + F9; a lot of things but I am open to trying anything else.
Thanks!