I’ve been attempting to sort a table based off specific values and can’t seem to find the correct format to implement this using formulas.
Here’s the breakdown.
I have a column which will be titled “Status” from now on. The Status column lets you chose from the following choices:
- Completed
- Top Priority
- Second Priority
etc… (I’ll stop there for the sake of simplicity).
I have this table grouped based off a different category and do not want to create another set of internal groupings. Instead, I would like to sort this table so that all Top Priority rows are shown 1st, all Second Priority rows are shown 2nd, etc…
The Problem
When I sort by “Status” either Ascending or Descending, it sorts alphabetically.
I looked around for a solution and found nothing specifically for this, but I found several other solutions which made a hidden column and checked another column’s value to determine that value for sorting.
I was hoping there was a simple away to do this and have tried using a switch function and cascding if statements, but all of it ends up extremely convoluted and doesn’t end up working.
Most of the time I have ended up with a “circularReference” error as I try to set the value of the sorting column on “thisRow”.
The Goal
The goal is to populate the Sorting column with numbers that correspond to Status. For example: If status is “First Priority” then Sorting would = 1 and when I sort by sorting, they will rise to the top.
Please help me out if you can.
Thank you -
Appendix
Added a redacted example of the table below.
Category | Task Name | Status | Deadline | Contact | Description | Notes | Sorting |
---|---|---|---|---|---|---|---|
Blog | Blog A | First Priority | May | [Redacted] | [Redacted] | [Redacted] | |
Blog | Blog B | Second Priority | Apr | [Redacted] | [Redacted] | [Redacted] | |
Blog | Blog C | Completed | May | [Redacted] | [Redacted] | [Redacted] |