问题
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?
回答1:
You could use a PivotTable to help you:
Select the field containing the list and go to 'Data' > 'Pivot table report...'
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:
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.
回答2:
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.
来源:https://stackoverflow.com/questions/21917210/how-can-you-sort-data-validation-input-list-in-google-spreadsheet