We help IT Professionals succeed at work.

Multiple criteria from two data validation lists triggers case select statement

Hello Experts,
I need a bit of code that will trigger a case select statement based upon user choosing from two data validation lists, each list contains multiple choices..
Thanks,
biker9
Criteria-sets-case-select.xlsm
Comment
Watch Question

Top Expert 2008
Commented:
Something like this?

Private Sub Worksheet_Change(ByVal Target As Range)
Dim rTar As Range, sTar As String

Set rTar = Range("G11:G12")

If Not Intersect(rTar, Target) Is Nothing Then
    
    Application.EnableEvents = False
    
    sTar = Cells(11, 7) & Cells(12, 7)
    
    Cells(18, "G") = IIf(sTar Like "[A-D][1-4]", sTar & " OK", "Error")
    
    Application.EnableEvents = True
End If

End Sub

Open in new window


Thomas

Author

Commented:
Hey Thomas,

Looks like I over simplified my question, if I change the selection list from A to D, to ie: Alpha, Beta, Ceta, Delta, and the other list to "One, Two, etc, it doesn't seem to work.

Tx,
Ray