Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Farv5()
- Dim varSelected As Variant
- For Each varSelected In Selection
- With varSelected
- Select Case WorksheetFunction.Round(.Value, 1)
- Case Is > 5
- i = i + 1
- Case Is >= 4.5
- .Interior.Color = RGB(0, 176, 80)
- Case Is >= 4
- .Interior.Color = RGB(146, 208, 80)
- Case Is >= 3.5
- .Interior.Color = RGB(255, 255, 0)
- Case Is >= 3
- .Interior.Color = RGB(255, 192, 0)
- Case Is >= 1
- .Interior.Color = RGB(255, 0, 0)
- Case Else
- .Interior.Color = RGB(191, 191, 191)
- End Select
- End With
- Next
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement