I used to know this a few years ago and for the life of me can't figure it out and can't find an answer in Google help.

I know how to sort columns, but only by the default A-Z format, how can I sort some columns by that and secondary ones by words that aren't alphabetical, like military rank? I know a couple of ugly workarounds, but I'd like the real deal.

  • share a copy of your sheet – user0 Jun 5 '19 at 19:04
  • I need it sorted by alphabetically by column D first, then column E (which I know how to do), then by C, which is the rank of the soldier and this (sorting by text) is the only one I can't figure out docs.google.com/spreadsheets/d/… – Mike Jun 5 '19 at 19:28
  • I would be able to give the ranks a number i.e. a numerical rank, if needed – Mike Jun 5 '19 at 19:34

There are two ways how to do it. Either use Create a filter or Create new filter view under Data after you select all columns:

enter image description here

enter image description here

The 3rd option would be to use a formula to sort the data based on a custom sequence which needs to be priorly defined

 IFERROR(VLOOKUP(Sheet21!C2:C, {Z2:Z, ROW(Z2:Z)}, 2, 0))}, 
 "order by Col4,Col5,Col15", 0), 9^232, 14))


| improve this answer | |
  • 1
    Thank you, I was trying to do it with assigning a number to their rank and using that to sort, I didn't know if there is a way to assign that rank/sequence – Mike Jun 5 '19 at 20:05
  • @Mike answer updated. also your sheet updated with sheet Sheet21 sorted that contains the formula and it sorts stuff as you wish based on custom order in Z column – user0 Jun 5 '19 at 20:40
  • 1
    Thank you very much, this is very useful for me! – Mike Jun 5 '19 at 21:00
  • I can't upvote because I'm new – Mike Jun 5 '19 at 21:07
  • @Mike no worries, next time ;) – user0 Jun 5 '19 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.