Figured this would be quite simple, but an hour or two searching Google has really scrambled my brain on this one.
In short, I have a drop down list in Excel, with 3 options: Red, White, Mixed. However I need to run a macro, on a button push that will check that 3 drop downs all contain either red, white, mixed... or blank.
So far I've managed:
If Not (Range("C17").Value) = "Red" Or "White" Or "Mixed" Then
MsgBox "Incorrect wine choice" & vbCrLf & _
"Please re-enter the colour of wine"
Exit Sub
End If
This is how I would have thought it would work but.. apparently not. Running it with just "= "Red"" is fine however.
Question
Coffeee
Figured this would be quite simple, but an hour or two searching Google has really scrambled my brain on this one.
In short, I have a drop down list in Excel, with 3 options: Red, White, Mixed. However I need to run a macro, on a button push that will check that 3 drop downs all contain either red, white, mixed... or blank.
So far I've managed:
This is how I would have thought it would work but.. apparently not. Running it with just "= "Red"" is fine however.
Much appreciated if someone could give us a hand,
Thanks,
C.
Link to comment
Share on other sites
6 answers to this question
Recommended Posts