Select a list, then sort
Thank you
"Sharad" wrote:
I realized that your Q. is already answered by Jay.
Just in case, if you have header row, make Header:=xlYes
"Sharad" wrote in message
...
By referring to the required range object, you can use .sort method.
e.g.: Below code will sort Range A1: to A100 in ascending order
Range("A1:A100").Sort Key1:=Range("A1"), _
Order1:=xlAscending, _
Header:=xlGuess, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Also, since you are new, you can record a macro in excel, for what you
want to do and then see the code in recorded macro.
Sharad
"Tanya" wrote in message
...
Hi
Could someone help me please? I need to be able to select a list in
sheet
and then sort by particular heading. I am new to macros. Any guidance
would
be appreciated.
Thanks in advance
|