Multi-level sorting would probably be suitable for this task if there was an option “ignore empty cells”.
I need to sort the rows so that the sorting for column A ignores empty cells, and the sorting rule for column C is applied to rows with these empty cells.
But multilevel sorting simply moves rows with empty cells in column A to the end of the list, and only then does the sorting rule for column C apply.
Here's an example of what I mean. Here's an unsorted list of random music bands:
| Band 1 | Info 1 | Band 2 | Info 2. |
|---|---|---|---|
| The Beatles. | some info... | some info... | |
| Queen | some info... | some info... | |
| some info... | Radiohead | some info... | |
| some info... | Nirvana | some info... | |
| Coldplay | some info... | some info... | |
| Metallica | some info... | some info... | |
| U2 | some info... | some info... | |
| some info... | Pink Floyd | some info... | |
| Red Hot Chili Peppers | some info... | some info... | |
| some info... | Imagine Dragons | some info... |
If I sort it using a multi-level sort with the first sorting rule on column A and the second sorting rule on column C, we have this result:
| Band 1 | Info 1 | Band 2 | Info 2. |
|---|---|---|---|
| Coldplay | some info... | some info... | |
| Metallica | some info... | some info... | |
| Queen | some info... | some info... | |
| Red Hot Chili Peppers | some info... | some info... | |
| The Beatles. | some info... | some info... | |
| U2 | some info... | some info... | |
| some info... | Imagine Dragons | some info... | |
| some info... | Nirvana | some info... | |
| some info... | Pink Floyd | some info... | |
| some info... | Radiohead | some info... |
But the result I need looks like this:
| Band 1 | Info 1 | Band 2 | Info 2. |
|---|---|---|---|
| Coldplay | some info... | some info... | |
| some info... | Imagine Dragons | some info... | |
| Metallica | some info... | some info... | |
| some info... | Nirvana | some info... | |
| some info... | Pink Floyd | some info... | |
| Queen | some info... | some info... | |
| some info... | Radiohead | some info... | |
| Red Hot Chili Peppers | some info... | some info... | |
| The Beatles. | some info... | some info... | |
| U2 | some info... | some info... |
The real table is much more complex, and sorting methods with auxiliary columns are highly undesirable.
I'm sure there is an easy way to do this sorting. But, it seems, I scoured the entire Internet. Perhaps I don’t know what this sorting is called correctly, and that’s why I couldn’t find



Try this array formula change the range to the actual size everywhere. You can create it simpler with the LET function.
Result