Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you sort data validation input list in google spreadsheet

Tags:

google-docs

Given the following data validation setup I can only select foods in the way I entered them in the list of foods column. Is there a way to sort these before I'm able to select those?

enter image description here

like image 411
Vincent Avatar asked Feb 20 '14 19:02

Vincent


2 Answers

You can use this formula to automatically sort the data you're entering:

=SORT(UNIQUE(A2:A500))

Enter this formula into another column, or another sheet, and use that range instead as the source for your data validation.

like image 150
Nikki Avatar answered Oct 07 '22 06:10

Nikki


You could use a PivotTable to help you:

  1. Select the field containing the list and go to 'Data' > 'Pivot table report...'

  2. Click 'Add field' for 'Rows' and pick the field in the dropdown. Ensure that the order is ascending, that the 'Show totals' is unchecked (or else, you'll get 'Grand Total' in your validation) and that the option is to update the table on each change:

enter image description here

Note: You usually get the pivot table in a different sheet. You can copy/paste the data in that new sheet and change the source data by clicking on 'Edit range...' like I did in the picture above, then delete the initial sheet.

like image 39
Jerry Avatar answered Oct 07 '22 05:10

Jerry