Computing.Net > Forums > Office Software > Sorting with macro

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Sorting with macro

Reply to Message Icon

Name: Tawker
Date: October 25, 2008 at 08:18:49 Pacific
OS: MSDOS
CPU/Ram: 2 GB
Comment:

Please let me know how to sort that it pick and gives the required list first and then sorts others. Eg from the list of ab,bc,cd,de,ef,fg,gh etc. It want cd and ef to come at the top (sorting order) and the rest to be sorted.



Sponsored Link
Ads by Google

Response Number 1
Name: Jennifer SUMN
Date: October 25, 2008 at 13:23:57 Pacific
Reply:

Move that particular row to the top and don't include it in the sort.

"So won’t you give this man his wings
What a shame
To have to beg you to see
We’re not all the same
What a shame" - Shinedown


0

Response Number 2
Name: DerbyDad03
Date: October 25, 2008 at 17:39:23 Pacific
Reply:

I see you used the word "macro" in your subject, so I am assuming you want to do this with code, as opposed to manually moving the data around.

If that's the case, it can be done, but I think we need a little more detail.

How would the code know what's in the "required list", in this case cd and ef?

In concept the code could be something like this:

1 - Search the big list for each item in the required list.

2 - Cut/Insert Paste each item to the top of the list.

3 - Select the items in the required list and sort them.

4 - Select the rest of the list and sort it.

The actual code would depend on how you are passing the required list to the macro.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Office Software Forum Home


Sponsored links

Ads by Google


Results for: Sorting with macro

Excel files with Macros www.computing.net/answers/office/excel-files-with-macros/1277.html

excel logs with macro www.computing.net/answers/office/excel-logs-with-macro/5754.html

Excel spreadsheet organizing macro www.computing.net/answers/office/excel-spreadsheet-organizing-macro/5763.html