Dynamic data validation lists populated from another cell

Copper Contributor

I am trying to achieve two things which I presume are possible but I'm unsure of where to start.

 

Screen Shot 2021-10-09 at 1.30.34 pm.png

 

What I am hoping to achieve is to populate the list (shown in cell C4) with the data entered in cell A3. What I don't know is how to make the A3 string breakdown based on the comma delimiter so that it is not one long string, but rather results in a list at C4, as displayed in the screenshot.

 

Note: I have hardcoded the list shown in the screenshot as I wanted to show what I need to achieve. If I reference A3 directly (=$A$3), my list only has one item - 'Yes, No, I don't know', opposed to the list displayed in the screenshot.

 

Then, if this is possible, instead of hard coding A3 as the reference, I want to read the value in B4. This would allow me to change the value of B4 to point at any other cell, such as A6.

 

I believe both these things are likely possible but Googling has not helped as it appears I'm searching for the wrong keywords.

 

Thank you in advance for anyone who can help me with this.

2 Replies

@ben_n_yc 

I don't think that is possible, or if it is, it'll be complicated.

Instead of entering the options in a single cell, enter them in a range of cells, with one option per cell. Then set the source of the data validation list to that range.

@ben_n_yc FILTERXML can be used to split the comma separated values.

I prefer making them look like HTML

="<tr><td>" & SUBSTITUTE(A3;",";"</td><td>") & "</td></tr>"

<tr><td>Yes</td><td> No</td><td> I don't know</td></tr>

 

and from there parse them to separate cells.

=FILTERXML("<tr><td>" & SUBSTITUTE(INDIRECT(B4);",";"</td><td>") & "</td></tr>";"//td")

 

=INDIRECT(B4) is one way to redirect to different set of options.

 

bosinander_0-1633782878517.png