ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sort button (https://www.excelbanter.com/excel-programming/420920-sort-button.html)

JeffK

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

Otto Moehrbach[_2_]

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




Otto Moehrbach[_2_]

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







All times are GMT +1. The time now is 12:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com