Sort excel cells by length of the strings

Hello friends,
How are you? Attached is an excel file. What I want is:
1) sort the column by the length. If the string length is 1, it will be put in the first row, so and forth.
2) remove the duplicated rows.

Thanks for help.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kannan KManager - EngineeringCommented:

Please attached excel workbook,

zhshqzycAuthor Commented:
Okay. There we go.
- Open it in Excel
- in B1 enter '=len(A1)
- Copy the formula down the column by double clicking on the little black square
- Select Column A
- Data ==> Sort ==> Column A
- Delete Column B
- Excel 2010 has a Remove Duplicates button on the Data ribbon, failing that you can use a Pivot table with just Column A selected to remove the duplicates

Hope this helps

sort by length of string

Put the list in column A
In Column B Row 1 type =LEN(A1) This gives you the length of A1
Edit Fill down B1 down Column B so you have =LEN(A2) etc
Copy, paste special, Values only , Column B
Highlight all
Now, data sort

remove duplicate rows

Select all the rows, including the column headers, in the list you want to filter.

On the Data menu, point to Filter, and then click Advanced Filter.
In the Advanced Filter dialog box, click Filter the list, in place.
Select the Unique records only check box, and then click OK.
The filtered list is displayed and the duplicate rows are hidden.

On the Edit menu, click Office Clipboard.
The Clipboard task pane is displayed.

Make sure the filtered list is still selected, and then click Copy .
The filtered list is highlighted with bounding outlines and the selection appears as an item at the top of the Clipboard.

On the Data menu, point to Filter, and then click Show All.
The original list is re-displayed.

Press the DELETE key.
The original list is deleted.

In the Clipboard, click on the filtered list item.
The filtered list appears in the same location as the original list.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
her is sorted file,  btw all were 11 long
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.