Sort Macro #2

I recorded this macro to sort a list according to a custom 
list.  The problem I have is that it does not sort on 
another users Excel because they don't have the same 
customs list.

Is there a way round this problem?

Sub Macro1()

    Columns("N:N").Select
    Selection.Sort Key1:=Range("N1"), 
Order1:=xlDescending, Header:=xlGuess, _
        OrderCustom:=12, MatchCase:=False, 
Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal
End Sub
0
anonymous (74719)
4/5/2004 1:08:19 PM
excel.misc 78881 articles. 5 followers. Follow

6 Replies
737 Views

Similar Articles

[PageSpeed] 7

Hi!

Application.AddCustomList ListArray:=Range("A1:A10") will add a custo
list to a workbook using a range you can specify and fill in advance.

Al

--
Message posted from http://www.ExcelForum.com

0
4/5/2004 1:58:19 PM
Thanks.  Can you use a list array as a range instead of a 
cell reference range.

>-----Original Message-----
>Hi!
>
>Application.AddCustomList ListArray:=Range("A1:A10") will 
add a custom
>list to a workbook using a range you can specify and fill 
in advance.
>
>Alf
>
>
>---
>Message posted from http://www.ExcelForum.com/
>
>.
>
0
anonymous (74719)
4/5/2004 2:55:41 PM
Hi!

If I understand you aright: have a look at the Help file item o
AddCustomList. I think you'll find what you want in the example there.

Al

--
Message posted from http://www.ExcelForum.com

0
4/5/2004 3:17:49 PM
Hi!

HTH

Al

--
Message posted from http://www.ExcelForum.com

0
4/5/2004 7:54:34 PM
Hi Alf

Please help me.  I have posted this as a new post but no 
one seem to be answering.

Can I put the sort list (Similar to a custom list) in a 
macro?

I can use the addcustmlist method to add the list to the 
custom lists, the problem is when recording the macro to 
sort according to that customlist the code selects the 
list according to it's position in the in the custom 
lists.  This lists might be different in a different order 
if run on another users computer.




>-----Original Message-----
>Hi!
>
>HTH
>
>Alf
>
>
>---
>Message posted from http://www.ExcelForum.com/
>
>.
>
0
anonymous (74719)
4/6/2004 11:19:58 AM
Dave:

Thanks for that. Adds to my knowledge...

Al

--
Message posted from http://www.ExcelForum.com

0
4/8/2004 10:12:30 PM
Reply:

Similar Artilces:

How do I move a chart using a macro?
Hi, all, I have a nice little macro that creates two charts on several worksheets in a workbook. My problem is that it places one chart right on top of the other. I just need to offset it enough to see both charts, or at least to remind myself that there are two of them there. I tried variations of the "Activechart.parent . . . ." commands I found elsewhere on the site, but I always get the debug screen when I get there. I'm using OFFICE 2007 and Vista. Thank you Jim -- JP Cummings Assuming you know what cell you want as the top left cell positio...

exchange 2k3 #2
Migrating from 5.5 & have thousands of pub folders w/smtp addresses I'd like to use policy to remove, but how? -there are a few I don't want to remove, but if I need to, I'll recreate by hand... "=?Utf-8?B?QWxleGFuZHJEaW9nZW5lcw==?=" <AlexandrDiogenes@discussions.microsoft.com> wrote in news:C04E91B1-9F55-4603-AE0E-1F1861F8079E@microsoft.com: > Migrating from 5.5 & have thousands of pub folders w/smtp addresses > I'd like to use policy to remove, but how? -there are a few I don't > want to remove, but if I need to, I'll recreate b...

macro to save new file (same as tab name)
Hi I am recording macro and want to save the new macro- recorded sheet as the same name as the sheet tab. I do have the tab name in one of the cells A1, using =cell("filename",A1) Example : sheet name week1, want to save new file as week1 I Can copy and paste into existing macro thanks in advance brian -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.aspx/excel-new/200601/1 Activeworkbook.SaveAs Filename:=Activesheet.Name -- HTH Bob Phillips (remove nothere from the email address if mailing direct) "Brian Thompson via OfficeKB.com" <u1568...

Macro question
Whenever I try to run my macro, nothing happens. When I try to change the security settings through the Tools > Security option, nothing happens. I can do it at home but not at work. Is there a specific reason? I'm the administrator of the computer and I am not connected to any domain. Please help! -- Nocturnal We see this sometimes when another application starts Outlook before you = do and VBA never quite loads properly. Try shutting down Outlook and = using Task Manager (Ctrl+Alt+Del) to make sure it's really, really shut = down before you restart it. You may also w...

Where's the Sort by New Message option?
Not sure when the layout of the newsgroups changed but I can't seem to find the ability to sort by new message in a thread instead of sorting by just the original thread date. That was hugely helpful as I could follow along and see what threads were still active. If you're gonna hang around in the newsgroups (any newsgroups), you may want to start using a newsreader. Microsoft Outlook Express can do it for you. Saved from a previous post: You may want to connect to the ms newsserver directly: If you have Outlook Express installed, try clicking on these links (or copy and paste i...

Cash Sales Entry #2
How to do a cash sales entry? You mean a cash-basis accounting type of entry or a sales transaction where you are receiving cash (as opposed to check or credit card)? New User wrote: > How to do a cash sales entry? ...

Chinese antique #2
Q2hpbmVzZSBhbnRpcXVlCndvcmxkIGZpcnN0LCB0aGUgYW50aXF1ZSBjaGluYXdhcmUgc2VyaWVz IHBsZWFzZSB3YXRjaCEKRW50aXJlIGZpZGVsaXR5IDEwMCUgQW50aXF1ZSAoMTkxMi0xOTQ5KSBS ZXB1YmxpYyBvZiBDaGluYSBwb3JjZWxhaW4KdGVhcG90IDg4OCBjaGluYXdhcmVzIDQwMCBwbGVh c2Ugd2F0Y2hpbmchCldlYnNpdGUgaHR0cDovL3d3dy54ang1ODguY29tCkUtbWFpbCB4anhfNTg4 QHRvbS5jb20KQ2l0eSBTaGVuZ3pob3UgWmhlamlhbmcgQ2hpbmEKCsirx/LOqNK7oaK5xbattMnG 98+1wdDD8bn6tMmy6Lr4ODg4sNHH67nbyc2joQrIq8fyzqjSu6GiyKuxo9XmucW2rbTJxvfPtcHQ w/G5+rS/ytbWtLTJsui6+Dg4OLDRoaK0ycb3NDAwvP7H67nbyc2howq5xdLV0Pm5xbatytWy2Nau trwKzfjVvqO6aHR0cDovL3d3dy54ang1ODguY29tCrXn08qjunhqeF81ODhAd...

Sorting
Hi, is it possible to use variable for sorting? Something like: declare @sort varchar(10) SET @sort='column1 DESC' SELECT ROW_NUMBER() OVER (ORDER BY @sort)AS rowId, * FROM table Is dynamic SQL only option? Thank you, Simon On 15/04/2010 11:28, simon wrote: > Hi, > > is it possible to use variable for sorting? > > Something like: > > declare @sort varchar(10) > SET @sort='column1 DESC' > > SELECT ROW_NUMBER() OVER (ORDER BY @sort)AS rowId, * FROM table > > Is dynamic SQL only option? You can use CASE to he...

How to sort account list?
I'm using MS Money 2004 Small Business. In the account list, my accounts are catagorized by and in this order: - bank accounts - credit accounts - investment accounts - loans and liabilities - asset accounts TOTAL BALANCE In the above view, I cannot easily determine totals for assets and liabilities. The following view does this. - bank accounts - investment accounts - asset accounts SUBTOTAL -loans and liabilities SUBTOTAL TOTAL BALANCE How do I get the above view? Thanks, Brett I don't use Small Business. But you can run a Net Worth report to get total assets and ...

Search and replace macro needed
I need a macro that will replace a space with a non-breaking space <b>for the selected text only</b> Hi Greg, Why do you need a macro, when you can use a simple Find/Replace operation? Select the desired range then: Find: ' ' Replace: '^s' Click 'Replace All'. -- Cheers macropod [Microsoft MVP - Word] "GregNga" <GregNga@discussions.microsoft.com> wrote in message news:FBBBB44D-6B2D-4445-9DFA-50EBC8BF20FE@microsoft.com... >I need a macro that will replace a space with a non-breaking space <b>for the > se...

Row names will not move with sort
Each row in my summary table in Sheet1 is hyperlinked to a corresponding table in Sheet2 with additional details. I need to move the rows in my summary table (Sheet1) and preserve the links to and from the details tables (Sheet2). I found that I can move rows in Sheet1 with cut & insert and the hyperlinks are maintained. I can travel from a row in summary table (Sheet1) to details table (Sheet2) and back, even after the corresponding row (Sheet1) was moved. But if I sort the rows in Sheet1 the links from Sheet2 back to corresponding rows in Sheet1 lead to presorted locations. Apparen...

Macro filter on query
I need to run 8 append and update queries using the same date range. I created a Form with the "Month" field as the filter and a command button to run the macro to run the Append & Update queries for records in the month range. I can't get the Apply Filter macro to work on the Query Date field. Any suggestions? Apply Filter action will not do what you seek. Your queries must have a WHERE clause that refers in some way to the textbox on the form where you've entered the Month value/data that you want to use in the queries. To assist you further, you need to post ...

sorts not sorting
OK- Thanks to everyones help I now i have a list i can work with... but there are a few problems.... the zips are all 5 digit and now i have to sort them... the problem is, THEY WONT SORT CORRECTLY!!!!!!! The numbers are not in order... some are but a lot are not... is there anyway to fix this???? i need to sort them by zip code but cant seem to get them to do it correctly.. any ideas??? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ You are going to be far better of...

Email Macro with Outlook Express
Once a week, I am in a position where I have to send between 80-160 emails to 80-160 different email addresses (the store locations in our company). I have an attachment that needs to be sent to each store, and each attachment is unique. However, I have all the attachments in one folder, and all of the attachments have filenames such as Store 101, Store 102, Store 103, etc... I have another file which lists all store numbers in Column A and their respective emails in Column B. Is there a way I can have a macro that does the following: 1. Creates an email with a Subject being the same as the ...

2 copies coming into Inbox
I recently paid for a hotmail account so I could have larger storage and not get cancelled for any reasons such as not checking it often enough. I followed the instructions and put my service on Outlook Express. Now I'm receiving 2 of every message. What's up? Can I fix this? Thanks Darla ...

import- number- sort?
I imported this data into a spread sheet- I tried to format it to number, but when I sort it- I get : 37.08 4.33 4.79 4.8 42.56 5.94 Whats up with this? Thanks Brent Hi Brent, Install the TrimAll macro, select the column and invoke the macro from Alt+F8 http://www.mvps.org/dmcritchie/excel/join.htm#trimall Directions to install and use a macro at http://www.mvps.org/dmcritchie/excel/getstarted.htm#havemacro I expect that you have spaces or CHAR(128) "Required Blank" characters in you data you can check is =LEN(A1) --- HTH, David...

sorting macro #3
I need to sort on 8 cells in a row and on 1500+rows. I can do it one at a time but I know there must be an easier way. Can ANYONE HELP? C3:J3 I need these cells sorted and then down to C1532:J1532 I did create a macro to sort after I selected them but still one at a time. Does it have to be a macro? I can edit a macro but don't really know how to program them. Yes, it has to be a macro. The following should do it. This macro loops through all the entries in Column C, and in each row it sorts the values in Columns C:J. HTH Otto Sub SortRows() Dim rColC As Range Dim i As...

excel macro...PLEASE HELP!
Hi there, Here's what I would like to know how to execute. Assuming I have created a macro in place in a file. When I open that file, I want that macro to run...how do I do it? Thank your for reading and any suggestions are welcomed! Hi Jack Rename it Sub Auto_open() -- HTH. Best wishes Harald Followup to newsgroup only please. "Jack" <tangjack@yahoo.com> wrote in message news:00e601c38ceb$78b050d0$a301280a@phx.gbl... > Hi there, > > Here's what I would like to know how to execute. > > Assuming I have created a macro in place in a file. When...

starting Word from an Excel macro
I found this piece of code by Bob Phillips that opens a Word document from within an Excel macro. Dim oWord as Object Dim oDoc as Object Set oWord = CreateObject("Word.Application") oWord.Visible = True Set oDoc = oWord.Documents.Open("C:\personal\bob\personal\CV - RP (short).doc") It works fine but it also closes the Excel file that contains the macro. Is there a way to prevent the Excel file from closing? -- russ Russ, There's nothing in that snippet that will close the Excel Application. I think you need to post all yo...

Populating outlook labels #2
Is there a way to do it using VB labels -- exodu ----------------------------------------------------------------------- exodus's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1572 View this thread: http://www.excelforum.com/showthread.php?threadid=27247 ...

Excel should allow macro on a shared workbook.
We are using excel tables all the time at my company. There are more than 20 people working on the same excel file which has thousands of columns so we use autofilter or some other macros. Shared workbook will help us alot because we will be able to change the file at the same time which is very time saving. Is there any way that macros are allowed at shared workbooks? ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not ...

Can we sort a form and also be able to enter new records.
Hi, It is possible to sort the data on a form and also be able to enter new and edit the existing records in it. Cheers! On Tue, 15 Jan 2008 15:41:16 -0800 (PST), Rex wrote: > Hi, > > It is possible to sort the data on a form and also be able to enter > new and edit the existing records in it. > > Cheers! I assume you mean "Is it". The form sort order has nothing to do with editing or adding new records, so the answer is yes. If you cannot edit or add new records, make sure the form's record source, if it is a query, is updateable. Some queries are not. O...

Sorting checking register
How do i sort my check register in Money 2004 Deluxe so that uncleared transactions appear below cleared transactions? In Quicken i could click on the column to provide that sort. In microsoft.public.money, Dean wrote: >How do i sort my check register in Money 2004 Deluxe so >that uncleared transactions appear below cleared >transactions? In Quicken i could click on the column to >provide that sort. You don't. Available choices are chosen by clicking View at the top of the register. ...

How to turn off editing after I have created a spreadsheet with macros
I have created a spreadsheet with macros and when I call the spreadsheet up on another computer and I click on the buttons I created it takes me to viusal basic to edit. How do I turn this off so I can run the macros? If you need more info please email me. I have tried it on 3 computers and one of the computers will run the macros, but the rest just go into what I call edit mode instead of running the macros. Any help would really be appreciated.--Gary ...

how can i use the same account with the same personal folders in two computers #2
please help in my company we have to use one account in two machines and we want every one in two machines to be aware of what the other do and what mails he send and recive, please note that dont use microsoft exchange as a mail server thanks in advance ...