Sorting rows with an "x" in them

%3CLINGO-SUB%20id%3D%22%5C%26quot%3Blingo-sub-3156670%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3ESorting%20rows%20with%20an%20%22x%22%20in%20them%26lt%3B%5C%2Flingo-sub%26gt%3B%3CLINGO-BODY%20id%3D%22%5C%26quot%3Blingo-body-3156670%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20sort%20my%20spreadsheet%20by%20multiple%20columns.%26nbsp%3B%20How%20do%20I%20indicate%20to%20Excel%20that%20if%20a%20row%20has%20an%20%22x%22%20in%20the%20%22A%22%20column%2C%20then%20that%20row%20gets%20sorted%20to%20the%20bottom%20of%20the%20document%3F%26nbsp%3B%20I%20want%20to%20be%20able%20to%20put%20an%20%22x%22%20in%20any%20rows%20that%20I've%20dealt%20with%2C%20and%20have%20them%20go%20to%20the%20bottom%20of%20the%20document.%26nbsp%3B%20This%20way%20I%20can%20save%20them%2C%20but%20they%20won't%20be%20distracting%20me%20when%20I%20review%20the%20rest%20of%20the%20document.%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EThank%20you!%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%26lt%3B%5C%2FP%26gt%3B%3C%2FP%3E%3CP%3EScott%26lt%3B%5C%2FP%26gt%3B%26lt%3B%5C%2Flingo-body%26gt%3B%3CLINGO-LABS%20id%3D%22%5C%26quot%3Blingo-labs-3156670%5C%26quot%3B%22%20slang%3D%22%5C%26quot%3Ben-US%5C%26quot%3B%22%3E%3CLINGO-LABEL%3EExcel%26lt%3B%5C%2Flingo-label%26gt%3B%26lt%3B%5C%2Flingo-labs%26gt%3B%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3C%2FLINGO-SUB%3E
Occasional Contributor

 

I'm trying to sort my spreadsheet by multiple columns.  How do I indicate to Excel that if a row has an "x" in the "A" column, then that row gets sorted to the bottom of the document?  I want to be able to put an "x" in any rows that I've dealt with, and have them go to the bottom of the document.  This way I can save them, but they won't be distracting me when I review the rest of the document.

 

Thank you!

 

Scott

4 Replies

@Scottisimo Sorting a column that contains truly blank cells (i.e. cells with nothing in it) proves to be tricky as these blanks will always be placed last. No matter which sort order you select.

 

To overcome this you would need to put an empty string in each of the cells in that column first and then over-write these with an X and then, every now and then, sort the table in ascending order of that column. Easiest done when you use a structured table and enter a formula like ="" (i.e. the equal sign and two regular quotation marks) in column A. This will auto-fill the entire column with the empty string formula. When you insert a row, the formula will be copied in automatically.

 

If you want all to be done automatic, as soon as you have entered an X in column A, you'll need VBA (a macro). Not my kind of thing, I'm afraid.

@Scottisimo 

Using 365, I do not touch the source data.  Instead, I use a formula to produce the reordered data on a separate worksheet.

= LET(
    current, Table1[x]<>"x",
    sorted,  SORTBY(Table1,current,-1),
    sorted
  )

Then again, as I am not deleting information from the source data, I could simply filter the displayed data

= FILTER(Table1, Table1[x]<>"x")

With legacy Excel similar things can be achieved manually with the Advanced Filter or with PowerQuery.

 

@Scottisimo 

As variant you may apply conditional formatting rule which highlight entire row or only the field with "x"

image.png

Now Sort by Color on No Fill

image.png

which gives

image.png

@Scottisimo 

In addition, with such approach instead of marking cells by "x" and applying conditional formatting rule you may simply fill cell by any color and after that Sort by Color -> No Fill