I've read past threads and you guys have been a big help. From a previous thread I have added the following code to format the cell for a specific temperature.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim oCell As Range
For Each oCell In Range("A2:s17")
Select Case oCell.Value
Case 91 To 130
oCell.Interior.ColorIndex = 3
Case 86 To 90.9999
oCell.Interior.ColorIndex = 46
Case 81 To 85.9999
oCell.Interior.ColorIndex = 44
Case 76 To 80.9999
oCell.Interior.ColorIndex = 36
Case 71 To 75.9999
oCell.Interior.ColorIndex = 35
Case 60 To 70.9999
oCell.Interior.ColorIndex = 10
Case Else
oCell.Interior.ColorIndex = xlNone
End Select
Next oCell
End Sub
It works great if I’m typing data to the worksheet, but the worksheet is a summary page and the data is a reference to another worksheet (one cell would equal “=data!A3”). If the “data” sheet changes I can’t get the “summary” sheet to update the conditional format with the code above. Can I add more code, or add a refresh button? Please help.
Thanks,
Mark
Private Sub Worksheet_Change(ByVal Target As Range)
Dim oCell As Range
For Each oCell In Range("A2:s17")
Select Case oCell.Value
Case 91 To 130
oCell.Interior.ColorIndex = 3
Case 86 To 90.9999
oCell.Interior.ColorIndex = 46
Case 81 To 85.9999
oCell.Interior.ColorIndex = 44
Case 76 To 80.9999
oCell.Interior.ColorIndex = 36
Case 71 To 75.9999
oCell.Interior.ColorIndex = 35
Case 60 To 70.9999
oCell.Interior.ColorIndex = 10
Case Else
oCell.Interior.ColorIndex = xlNone
End Select
Next oCell
End Sub
It works great if I’m typing data to the worksheet, but the worksheet is a summary page and the data is a reference to another worksheet (one cell would equal “=data!A3”). If the “data” sheet changes I can’t get the “summary” sheet to update the conditional format with the code above. Can I add more code, or add a refresh button? Please help.
Thanks,
Mark