Home > Net >  how to sort a column by creating custom list in excel?
how to sort a column by creating custom list in excel?

Time:11-02

I have a column in an excel file like this-

Replication
R1
R1
R1
R2
R2
R2
R3
R3
R3
..

I want to sort this column like this-

Replication
R1
R2
R3
R1
R2
R3
R1
R2
R3
..

How can I achieve this by using excel sort by creating a custom list?

CodePudding user response:

Create a helper column that counts the number of Replication above it. Put this in the helper column:

=COUNTIFS($A$2:A2,A2)

enter image description here

Then sort ascending both columns looking first at the sort column:

enter image description here

Then you can hide the sort column if you desire or delete it if the sort is just a one off.

  • Related