#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default sort button

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default sort button

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

"JeffK" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,071
Default sort button

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

"Otto Moehrbach" wrote in message
...
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

"JeffK" wrote in message
...
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





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort Button John Gregory Excel Discussion (Misc queries) 2 June 25th 08 08:27 PM
Automated sort button Bwells Excel Discussion (Misc queries) 4 September 20th 07 03:22 PM
Create a sort button? jmpruitt Excel Discussion (Misc queries) 1 January 6th 06 03:15 AM
Making a button to sort Mo Excel Worksheet Functions 2 October 21st 05 08:19 PM
Add Sort button Mike Excel Programming 2 December 17th 03 12:42 AM


All times are GMT +1. The time now is 04:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"