0

Consider having a list - Ferrari, Mclaren, Red Bull on A2, A5, A8 cells, if i make a name for the list - "F1", and put it in data validation it pops up an error -

"The list source must be a delimited list, or reference to single row or column".

Is there any workaround?

2 Answers 2

2

AFAIK the only way is to convert your range of cells to a delimited string...

activecell.Validation.Add xlValidateList,,,Join(array([a2],[a5],[a8]),",")

The list separators are dependent on your locale settings, comma or semicolon (File > Options > Advanced > Use system separators)

Sign up to request clarification or add additional context in comments.

2 Comments

Can you please explain more, i am not familiar with tha VBA code.
To run the code, choose a cell, press Alt+F11 then enter the command in the immediate window. You can also just do this manually if you are not familiar with VBA, the idea is just to put the list in the validation dialog box as you highlighted in the question.
0

The delimiters must be semicolons, not commas.

Ferrari;McLaren;Red Bull

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.