You may not use reference operators or array constants for Data Validation?

blbat

Active Member
Joined
Mar 24, 2010
Messages
293
Then How do I make a drop down list based on 3 possible values in an adjacent column?
 

Some videos you may like

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

xenou

MrExcel MVP
Joined
Mar 2, 2007
Messages
16,824
Office Version
  1. 2019
Platform
  1. Windows
Hi,
I think it might work if you name the range (the values in the adjacent column). Then you can use the named range in the data validation.

ξ
 

blbat

Active Member
Joined
Mar 24, 2010
Messages
293
Thanks very much for the response xenou!

I've been bashing at this all morning, and was venting my frustration.

I have tried creating Two Named Ranges, "PickOne" and "NoTen"

"PickOne" contains the values 0,5 and 10
"NoTen" contains the values 0 and 5

I'm sorry I can't use HTML maker from this computer due to group policies, or I would show an example of the following description:

Column "A" is Labeled "Score One" and Column "B" is Labeled "Score Two"

Column "A" and Column "B" can ONLY contain a numeric value of 0,5 or 10
If either "A" or "B" has a value of 10, then the other may NOT, i.e.,
If Cell "A2" contains a "10" THEN Cell "B2" may NOT contain a 10, but Cell "B2" can have the 0 or 5

the following code for my datavalidation is where I got the error message:

Code:
=IF(H2="",(PickOne,INDIRECT(H2)),IF(H2=10,(NoTen,INDIRECT(H2)),IF(H2=5,(PickOne,INDIRECT(H2)),IF(H2=0,(PickOne,INDIRECT(H2)),""))))

I hope that is enough to go on...
 

xenou

MrExcel MVP
Joined
Mar 2, 2007
Messages
16,824
Office Version
  1. 2019
Platform
  1. Windows
That's a little unusual. I'm might prefer a conditional formatting "warning" rather than strict cell validation - easier to do.

This seems to work. If you use a "custom formula" for the validation, you want a true or false type of result.

In A2:
=IF(B2=10,OR(A2=0,A2=5),OR(A2=0,A2=5,A2=10))

In B2:
=IF(A2=10,OR(B2=0,B2=5),OR(B2=0,B2=5,B2=10))
 

blbat

Active Member
Joined
Mar 24, 2010
Messages
293
It is unusual-

The reason is because the combined value of any given row in the two columns can't be >=20.

Your Custom Formula achieves the desired outcome.

I truly appreciate it.

regards,

blbat
 

Watch MrExcel Video

Forum statistics

Threads
1,127,331
Messages
5,624,061
Members
416,008
Latest member
PETE91

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
Top