John Davis
Well-known Member
- Joined
- Sep 11, 2007
- Messages
- 3,457
Hello All:
Just checking is it proper to nest Select Case's as in the following?
Or is there a better way to do this?
Just checking is it proper to nest Select Case's as in the following?
Code:
Sub StartingOut()
If Range("N3").Value = "ball" Then
Select Case Range("B3").Value
Case Is = "P1"
Select Case Range("H3").Value
Case Is <= #2:00:00 AM#
Range("H3").Interior.ColorIndex = 4
Case Is > #2:00:00 AM#
Range("H3").Interior.ColorIndex = 3
End Select
Case Is = "P2"
Select Case Range("H3").Value
Case Is <= #6:00:00 AM#
Range("H3").Interior.ColorIndex = 4
Case Is > #6:00:00 AM#
Range("H3").Interior.ColorIndex = 3
End Select
End If
End Sub
Or is there a better way to do this?