Sort By Length In Excel

In this article we will see how we could sort by length in excel i.e.We may have some data arranged in a column and we want the longest string to appear first and then the string shorter than the first and so on length of the strings gradually decreases.

We will see a simple way in excel to sort the text strings based on the number of character they have.

Below is the data which is sorted based on their lengths.

Capture

Step 1

We have the data in column A as shown below, Enter the formula =LEN(A1) in cell B2.

Capture

Step 2




Enter the length formula to calculate the number of characters in the string on the basis of which we will sort by length and drag it till you have the data available in column A.

Capture

Capture

Step 3

Now we will have to sort the data based on their length, to do that go to Sort Option in Data tab in Excel.

Capture

Step 4

Sort by Length column which we have just calculated and press OK




Capture

Step 5

As you could see below the data is sorted in descending order of their lengths, to sort the data in ascending order just select the order “Smallest to largest” in the Sort box in Step 4.

Capture

Now you could delete or hide the length column based on your requirement.

Hope this helped.

Share The Knowledge

Random Posts

  • Find Factorial In Excel

    Let’s see how to calculate the factorial of a given number in excel.There is a inbuilt function called FACT available […]

    Share The Knowledge
  • Sort By Length In Excel

    In this article we will see how we could sort by length in excel i.e.We may have some data arranged in a […]

    Share The Knowledge
  • Get/Extract Every Nth Value In Excel

    In this post we will see how to extract every nth value/row in excel. We will try to understand how […]

    Share The Knowledge
  • Return Formula As String In Excel

    Let’s see how to return a formula as string or formula as text in excel. We often come across a […]

    Share The Knowledge

Leave a Reply