Double Validation on Column

Abulafia

Board Regular
Joined
Jun 15, 2004
Messages
66
I have a column with validation. It is a list of three options. As many can be picked but the choices are limited to only two of the three so it can be like this.

Person#1: Option1
Person#2: Option2
Person#3: Option1

But this would cause an "error"

Person#1: Option1
Person#2: Option2
Person#3: Option3

The range xs is a count if which ones appear. If xs = 3 then there is a violation

Code:
If Range("xs") > 2 Then
                
                ActiveCell = ""
                ' If so, display an error message
                MsgBox Range(nrMessage2), vbExclamation, Range(nrTitle2)
                
            End If

Unfortunately when I run the code, nothing happens. The message box appears though.

And I've tried Application.Undo too.
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,203,462
Messages
6,055,562
Members
444,799
Latest member
CraigCrowhurst

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top