Home > Software design >  when sorting in google sheets it will only sort all columns to the left
when sorting in google sheets it will only sort all columns to the left

Time:06-29

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?

CodePudding user response:

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:

CodePudding user response:

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.

  • Related