Sorting by file extension in a worksheet

K

Karl

Hello,
I have an excel worksheet which has a list of file names from a
directory and various stats about each file. I need to be able to sort
them by the file extension.

Eg.

c:\documents\folderA\picture1.eps
c:\documents\folderB\document.doc

I would like to sort them by the ".eps" extension. I have tried using
the Data,Sort menu and something like *?*.eps as the criteria. But am
obvisouly missing something.

Any help would be most appreciated.

Thanks

Karl
 
P

Pete_UK

You could use a helper column to extract just the extension then
include this in your sort range and sort on the helper column. You will
need a formula like:

=RIGHT(A1,3)

to get the extension, assuming the full filename and path is in column
A. Copy the formula down.

Alternatively, you could use Data | Text-to-Columns using . as the
delimiter to separate the extension into another column.

Hope this helps.

Pete
 
Top