Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for that.
The thing that worries me is that I haven't experienced it as I said, so that means it is intermittent. Thus by adding 1, it may one day fail with that. The only way I can see is to test it with the index before using in anger - nasty! -- HTH Bob Phillips "fugfug" wrote in message ... If your interested the code I used is as follows, customers is the sheet with the data to be sorted on. Sub List() ' ' List Macro ' Macro recorded 12/07/2005 by James Fuggle Sheets.Add ActiveSheet.Select ActiveSheet.Name = "List" Range("A1").Select Dim reply As String Do Until reply = "stop" ActiveCell.Offset(1, 0).Select reply = InputBox("Enter company name", "Company Input") ActiveCell.FormulaR1C1 = reply Loop ActiveCell.ClearContents Application.AddCustomList ListArray:=Range("A1:A2000") Sheets("Customers").Select Range("A3:N2000").Select Selection.Sort Key1:=Range("A3"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=(Application.CustomListCount) + 1, MatchCase:=False, Orientation:=xlTopToBottom End Sub -- fugfug ------------------------------------------------------------------------ fugfug's Profile: http://www.excelforum.com/member.php...o&userid=24950 View this thread: http://www.excelforum.com/showthread...hreadid=386709 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Advanced Sort Question | Excel Discussion (Misc queries) | |||
Code to replace Advanced Filter | Excel Discussion (Misc queries) | |||
Advanced Conditional Formatting Ideas Needed! (ok, maybe not that advanced...) | Excel Discussion (Misc queries) | |||
How can I advanced sort into a Collum | Excel Discussion (Misc queries) | |||
Advanced Sorting\VBA Code | Excel Programming |