PDA

View Full Version : Sleeper: Sort worksheet by suffix



lior03
06-10-2005, 11:17 AM
hello
is it possible to sort a worksheet that contains a list of
files in a directory, by suffix?
namely all excel files(xls) all word files (doc) and
all adoba acrobat files(pdf)?
each group by itself sorted by a scending order.
thanks
moshe

mdmackillop
06-10-2005, 11:45 AM
If you add another column you can extract the suffix using
=Right(A1,3) etc. and then sort on this column, or do you need something more "sophisticated"?

lior03
06-10-2005, 12:24 PM
yes
i want something sophsicated.
moshe

MWE
06-10-2005, 12:34 PM
yes
i want something sophsicated.
moshe
What else do you want the sort to do? How much more "sophistication" is required?

mdmackillop's suggestion would provide the sort. The steps would be:
1. add the extra column with the suffix extraction
2. sort the entire range; first on the extra column and then on the "orig" col
3. you could then delete the extra column if it is "in the way"

If you were to turn on the macro recorder, do the manual steps and then turn off the macro recorder, you would have a good starting point for a macro you could run whenever you wanted.