Hi there,
I have this wonderful code running but would like to add a couple more values to consider when a value is changed.
Could you suggest a string of code to allow for multiple values to be considered.
Cheers,
Hayden
I have this wonderful code running but would like to add a couple more values to consider when a value is changed.
Could you suggest a string of code to allow for multiple values to be considered.
Cheers,
Hayden
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Resp As String
Dim prevValue
prevValue = pVal
On Error GoTo ExitNow
Application.EnableEvents = False
If Target.CountLarge = 1 And Not Intersect(Target, Range("G11:T178")) Is Nothing Then '<--- Change Target Range Here
If swapval = False Then
'---EDO/EDO-U
If prevValue = "EDO" Or prevValue = "EDO-U" Then
If InStr(Target.Value, "0" [B][COLOR=rgb(235, 107, 86)]MORE VALUES HERE)[/COLOR][/B] Then
With Target
ActiveSheet.Unprotect
.Interior.Color = RGB(120, 210, 91)
.Font.Color = RGB(255, 0, 0)
'Input Box below. change text and title as needed:
Resp = Application.InputBox("You are allocating an open shift to a DAO on an EDO. Please include details of when this shift was added and notify the DAO at the earliest opportunity.", _
Title:="Open shift added on an EDO")
ActiveSheet.Protect DrawingObjects:=False
End With
End If
Else