1

I'm building a quote for a client, based on their list of tasks.

I've entered these tasks in his order down along my first column (a).

My first row (1) is a collection of headings, which I've frozen.

Subsequent columns contain my notes, my time estimates, cost estimate, etc.

I would like to be able to sort the rows according to numbers in different columns, but then to be able to return to the original order of tasks as specified by my client.

Advice would be much appreciated.

6
  • 1
    Ctrl+Z, why not? Or add column "Original Order" and fill it with 1,2,3... and sort by it
    – JohnSUN
    Sep 21, 2022 at 17:47
  • I would like to be able to experiment and play around with the data without having to worry about how many undos I can perform, having a power cut and losing connection to the web application, etc. Sep 21, 2022 at 17:52
  • 1
    Per @JohnSUN, add a helper column numbered as your default sort order.
    – Blindspots
    Sep 21, 2022 at 19:28
  • @BlindSpots Yes, this wording should be much clearer, thanks.
    – JohnSUN
    Sep 21, 2022 at 19:31
  • Added the column, used the fill function to populate the cells with numbers. If you'd like to format your response as an answer, I'll mark it as correct. Sep 21, 2022 at 21:00

1 Answer 1

1

Per @JohnSUN's comment with the correct answer.


add an index

Rows of data can be sorted and resorted by any column (or combination).

If the table data does not have an explicit sort order tied to a column (or columns) of data, there is no way to sort table data based on an "original" order.

It is important to recognize this and avoid a situation where a particular sort order is wanted but there is no data on which to sort that will create it. This is quite common, for example some exported data ordered by order of entry but with only the date of entry provided. Multiple entries on the same day are displayed in the right order (order of entry) however once sorting the data there is no way to return the original sort as the dates of each entry on the same day give no additional info as to the order of entry.

The typical workaround is to simply add a helper column to your data prior to performing any actions that might change the order. This helper column (index) is typically numbered incrementally starting with 1 and increasing by 1 for each row of data.

In this way, sorting at any point in the future using this helper column will return your data to the order it was in when the helper column was first numbered.

There is no reason that you could not add additional helper columns to lock in other orders of data as you see fit.

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.