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

  • Unit Conversion In Excel

    Let’s see how to do unit conversion in excel. We will see how we could leverage a simple convert function […]

    Share The Knowledge
  • Excel Deselect Cells/All

    This post demonstrates how to deselect all the cells without changing the active cell in excel The features is available […]

    Share The Knowledge
  • Case Insensitive String Comparison In VBA

    case independent string comparison VBA, excel vba to compare string case independently, make string comparison case independent in vba

    Share The Knowledge
  • Dependent/Conditional Drop Down In Excel

    In this topic we will see how to create a dependent drop down in excel i.e. a drop down that […]

    Share The Knowledge

Leave a Reply