Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alphabetical sort in a macro
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alphabetical sort in a macro
need a bit of imagination to answer this on -- tony ----------------------------------------------------------------------- tony h's Profile: http://www.excelforum.com/member.php...fo&userid=2107 View this thread: http://www.excelforum.com/showthread.php?threadid=52305 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alphabetical sort in a macro
Cells.Sort Key1:=Range("A1")
-- Regards, Tom Ogilvy "tony h" wrote: need a bit of imagination to answer this one -- tony h ------------------------------------------------------------------------ tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074 View this thread: http://www.excelforum.com/showthread...hreadid=523054 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alphabetical sort in a macro
I thought i'd try the hard questions first.
Thanks Tom. Regards Richard. "Tom Ogilvy" wrote: Cells.Sort Key1:=Range("A1") -- Regards, Tom Ogilvy "tony h" wrote: need a bit of imagination to answer this one -- tony h ------------------------------------------------------------------------ tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074 View this thread: http://www.excelforum.com/showthread...hreadid=523054 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alphabetical sort in a macro
I still can't figure out how to create a macro that will sort the same
information in the same way on multiple sheets in the entire workbook. Possibly because I can't figure out how to select the whole workbook. RichardVisteon" wrote: I thought i'd try the hard questions first. Thanks Tom. Regards Richard. "Tom Ogilvy" wrote: Cells.Sort Key1:=Range("A1") -- Regards, Tom Ogilvy "tony h" wrote: need a bit of imagination to answer this one -- tony h ------------------------------------------------------------------------ tony h's Profile: http://www.excelforum.com/member.php...o&userid=21074 View this thread: http://www.excelforum.com/showthread...hreadid=523054 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alphabetical sort in a macro
something like this (UNTESTED):
sub richard() dim WS as worksheets dim myLastRow as long dim myRange as range for each ws in activeworkbook mylastrow = ws.cells(10000,1).end(xlup).row set myrange = ws.range("a1:d" & mylastrow) myrange.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlNo, _ OrderCustom:=1, Orientation:=xlTopToBottom next ws end sub this sets a range based on columns a - d, using A1 as the sort key. adjust to suit. hope it gets you started. try recording a macro on one of the sheets to get the sort options the way you want them, if these don't work for you (regarding headers & such). :) susan On Jul 25, 10:55*am, nhamilt wrote: I still can't figure out how to create a macro that will sort the same information in the same way on multiple sheets in the entire workbook. Possibly because I can't figure out how to select the whole workbook. RichardVisteon" wrote: *I thought i'd try the hard questions first. *Thanks Tom. *Regards Richard. "Tom Ogilvy" wrote: Cells.Sort Key1:=Range("A1") -- Regards, Tom Ogilvy "tony h" wrote: need a bit of imagination to answer this one -- tony h ------------------------------------------------------------------------ tony h's Profile:http://www.excelforum.com/member.php...o&userid=21074 View this thread:http://www.excelforum.com/showthread...readid=523054- Hide quoted text - - Show quoted text - |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to do an alphabetical sort by using page break | New Users to Excel | |||
Alphabetical sort with formulas | Excel Discussion (Misc queries) | |||
alphabetical sort | Excel Worksheet Functions | |||
Sort - Not Alphabetical | Excel Discussion (Misc queries) | |||
Using a macro to sort your data in alphabetical order? | Excel Discussion (Misc queries) |