Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Alphabetical sort in a macro


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default 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
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
how to do an alphabetical sort by using page break laughinboy New Users to Excel 1 March 26th 10 08:48 PM
Alphabetical sort with formulas Matt Excel Discussion (Misc queries) 0 April 23rd 09 08:15 PM
alphabetical sort Jock Excel Worksheet Functions 4 November 2nd 07 09:59 AM
Sort - Not Alphabetical tommcbrny Excel Discussion (Misc queries) 1 April 16th 07 09:25 PM
Using a macro to sort your data in alphabetical order? Carrie Excel Discussion (Misc queries) 1 April 14th 05 03:07 PM


All times are GMT +1. The time now is 04:33 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"