mikelowry
mikelowry

Reputation: 1727

when sorting in google sheets it will only sort all columns to the left

I'm trying to sort by a column in my Google sheets, however, when sorting it will only sort the specified sort column and all the columns to the left.

I need it to sort all the columns to the right as well.

Concretely, if I sort the height column in the example below, it will only change the Name and height column's order, but not width and notes.

enter image description here

Any ideas?

Upvotes: 0

Views: 1881

Answers (2)

Nikko J.
Nikko J.

Reputation: 5543

Try this formula:

={A1:D1;SORT(A2:D4,4,FALSE)}

You can change the 2nd parameter in the SORT function to whatever column you want to sort.

Example:

enter image description here

Output:

Here I sorted the 4th column or the notes

enter image description here

Note: When you sort a data, make sure to include all rows and columns that you want to include in the sort. Otherwise it will only sort the range you will provide. (This is applicable to both Sort Formula and Manual Sort in the Menu)

Reference:

Upvotes: 1

Nam Tran
Nam Tran

Reputation: 661

You have to select data table range first, then choose menu Data -> Sort range -> Advance sort range (or custom sort range, idk what its name is in ENG, I translated it from my local language). Then you have a dialog for sorting this range: having header row or not, column to sort, add column to sort.

Upvotes: 1

Related Questions