Lod
Lod

Reputation: 769

How to display numbers in ascending order in data validation even after selection?

I've made a drop down list of numbers from 1 to 104 in range A1:A104 with Data validation.

The issue I get is the following:

After I select a number from the list and populate the output cell, the list then sort from the next multiple of 10.

Here's a screenshot of the issue: enter image description here

I tested the 2 solutions from this prior question but they don't resolve the issue:How can you sort data validation input list in google spreadsheet The multiple of 10 still follows instead of the ascending or next unit number order. Is there a way to make it sort the list in ascending order or next unit even after selection?

EDIT1: Test sheet as requested

EDIT2: It does sort in ascending order for strings/month text and from thousands/years:

TEXT SORTING

FROM THOUSANDS SORTING

Why not regular digits?

Upvotes: 1

Views: 1308

Answers (2)

Erik Tyler
Erik Tyler

Reputation: 9345

Drop-down lists attempt something akin to auto-fill, i.e., once you type something, "closest matches" appear toward the top of the list, getting ruled out as you type more.

My question would be this: why have a drop-down for numbers 1 to 104 in the first place? Wouldn't it be easier and take less time to use a custom formula for the data validation, e.g.:

=AND(A3>=1,A3<=104)

... and then just set it to Reject any other input?

You could use cell-contained instructions if necessary, or even use the "Show validation help text" option in the data-validation window.

Upvotes: 1

marikamitsos
marikamitsos

Reputation: 10573

EDIT
(following OP's comment)

Thanks @marikamitsos It does sort in ascending order for strings/month text and from thousands/years. Why not for regular digits?

As you can see in the image, the same priority is followed for text as well as with digits.

enter image description here


Unfortunately you cannot.
It is just the way Google Sheets return results giving priority to your search terms.
Do notice the bolded digits.

That is why you see this:

enter image description here

OR even this:

enter image description here

Upvotes: 1

Related Questions