sort button

J

JeffK

I have a date range A11:H500 (column B contains dates). I want to use a Form
Button that will sort the data in Decending date order. Can someone help me
with the macro. Using Excel 2003.

Much appreciated
 
O

Otto Moehrbach

Using the macro recorder I get this. HTH Otto
Sub SortIt
Range("A11:H500.Sort Key1:=Range("B11"), Order1:=xlDescending,
Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub
 
O

Otto Moehrbach

Oops. That should be: HTH Otto
Sub SortIt
Range("A11:H500").Sort Key1:=Range("B11"), Order1:=xlDescending,
Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub
 

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