ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Combobox - Sorting Data (https://www.excelbanter.com/excel-programming/326749-combobox-sorting-data.html)

Teresa

Combobox - Sorting Data
 
Sub SOR()
I have a combobox - when I choose an option it arranges data according to
Client which is currently in column G, however I need to sort data according
to "Client" irrespective of the Column, how do I tinker with the code below
to do this - Thanks


' SOR Macro
' Macro recorded 20/02/2005 by _ _
'

'
Range("C9:AS69").Select
Selection.Sort Key1:=Range("G9"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub


Tom Ogilvy

Combobox - Sorting Data
 
Key1:=Range("G9"),

specifies to sort on column G. If you want to sort on some other column,
change Key:= to point to another column in the data.

--
Regards,
Tom Ogilvy

"teresa" wrote in message
...
Sub SOR()
I have a combobox - when I choose an option it arranges data according to
Client which is currently in column G, however I need to sort data

according
to "Client" irrespective of the Column, how do I tinker with the code

below
to do this - Thanks


' SOR Macro
' Macro recorded 20/02/2005 by _ _
'

'
Range("C9:AS69").Select
Selection.Sort Key1:=Range("G9"), Order1:=xlAscending,

Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub





All times are GMT +1. The time now is 04:28 AM.

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