Sort entire column by string length of cells ...

R

Reflex

I have an excel file that has only one column of data. This colum
however is very long (about 5000 cells). The contents of the cells i
this column contain letters, numbers, commas, and full stops. N
spaces.

What I need to do (and have no idea how to, as someone who doesn't ge
the opportunity to use excel very often) is sort this entire column b
string length of the cells.

So if I had 5 rows in one column that looked like this:

perkins,15.04
williams,17.08
ford,12.65
banks,43.9
estado,112.63

I need to find out how to automatically sort this column so that th
above list would look like this (sorted by shortest to longest strin
length):

banks,43.9 (which has 10 characters)
forde,12.65 (which has 11 characters)
estado,12.63 (which has 12 characters)
perkins,15.04 (which has 13 characters)
williams,17.08 (which has 14 characters)

Can anyone please help. Thanks.
Stephen
 
G

Gord Dibben

Assuming your one column of data is Column A.

In B1 enter =LEN(A1)

Double-click on the fill handle(small black lump at bottom right corner of B1)
to replicate/increment the formula down Column B to bottom of Column A.

Copy Column B and Paste Special(in place)>Vaules>OK>Esc.

Select both columns and sort by Column B.

Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top