Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Drop-down validation list created dynamically

In range A1 I have a drop-down validation list. Based on the user's selection from that list I would like to dynamically create a new drop-down validation list in range C1. For instance, in A1 the list contains:

A

B

C

So if the user selects A from the list, the new list in C1 contains:

1) Annoying Orange

2) Angry Birds

3) Arbitrary Sample

If the user selects B, the new list contains:

1) Bloated Code

2) Better Left Unsaid

3) Bad Attempt

etc

Easy enough to do using VBA. But in GAS.... I have absolutely no idea of how to even start :/

like image 742
5th4x4 Avatar asked Jan 19 '26 10:01

5th4x4


2 Answers

The Apps Script API for data validation was just released: http://googleappsdeveloper.blogspot.com/2013/08/answering-another-top-request-data.html

like image 73
Karl Avatar answered Jan 21 '26 07:01

Karl


You could follow the example in the accepted answer to Google spreadsheet Script Create Data Validation in certain range.

... up until last week, it would have worked. Unfortunately, the Data Validation class and related Range methods getDataValidation() and setDataValidation() have disappeared.

Your only avenue at this point is to visit Issue 2958 and star it, so you receive updates if & when the API is refreshed.

like image 37
Mogsdad Avatar answered Jan 21 '26 07:01

Mogsdad