I'm completely new to sheets and am currently trying to set up a filter for a column. The column is set up to use dropdowns to pick a string.

What I'm trying to do is order it by the text, but not alphabetically. In the sheet shown I'm trying to filter it so that General shows, then Major General, Brigade General, etc etc. I'm not even sure if it's possible with filters at this rate.



1 Answer 1


The easiest solution would probably be to create a Sort key column by using the match() function.

Choose View > Freeze > 2 rows and put this formula in cell B2:

  "Sort key", 
    { "General", "Major General", "Brigade General", "Raid Captain", "Active Duty", "Commander", "Lieutenant", "Sergeant", "Corporal", "Private" }, 

Then choose Data > Sort sheet > Sort sheet by column B.

See vstack(), arrayformula(), iferror() and match().


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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