Tornado168
Tornado168

Reputation: 455

Sort table taking into consideration blank cells

Is there a way or code to sort this table in this way?

<-- Before / After -->

Upvotes: 0

Views: 63

Answers (1)

pnuts
pnuts

Reputation: 59450

Assuming column with gaps is ColumnA and that you have a blank row as Row1 in a spare helper column (say D) insert in Row2:

=IF(ISBLANK(A2),D1,A2)  

copy down then sort on that.

Before sorting:

enter image description here

After sorting:

enter image description here

Upvotes: 1

Related Questions