Sorting data on button click

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi guys !

I have one sheet with cca 400 rows, divided in columns like name, date,
location, number etc.

Now, what i want to do is to create something like in windows explorer.
One "menu" where you can click on name, size, type, date modified etc.
and on click, columns should be sorted ascending or descending. The same
as in windows explorer....

How to make this ?
 
If you're using xl2003 (or higher), you can apply data|filter|autofilter.
There's an option under each arrow that allows you to sort the filtered range by
that field.

If you're using any version of excel, you can use a technique at Debra
Dalgleish's site:
http://contextures.com/xlSort02.html

If you're new to macros:

Debra Dalgleish has some notes how to implement macros here:
http://www.contextures.com/xlvba01.html

David McRitchie has an intro to macros:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

Ron de Bruin's intro to macros:
http://www.rondebruin.nl/code.htm

(General, Regular and Standard modules all describe the same thing.)
 
Back
Top