+ Reply to Thread
Results 1 to 3 of 3

Multi level sorting - line continuation limit

  1. #1
    Registered User
    Join Date
    01-01-2021
    Location
    hong kong
    MS-Off Ver
    2010
    Posts
    1

    Question Multi level sorting - line continuation limit

    I want to perform multi level sorting by using VBA, and the code is below structure:
    ********
    Please Login or Register  to view this content.
    ********
    However, I have more than 2,000 column to sorting (from A:A to CLH:CLH). It would reach line continuation limit if I use this method. May I know how can I modify the code?

    Thanks!!
    Last edited by davesexcel; 01-02-2021 at 04:35 AM.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: Multi level sorting - line continuation limit

    this is going to crash excel, my man. not good. you need a database, seriously. why do you have 2000 cols of data!? wow. but, if you want to attempt it, use the macro recorder, do the sorting of 2 cols through the interface by clicking buttons, look at the code, see the iterative and pattern of key integer counting the program does, and any other relevant issues, then copy it 1998 more times. done. if you need to produce the code by automation, copy the 2 lines of VBA code excel gives you into 2 rows in col a, then parse the data out to many diff cols, and use the autofill handle to drag down 1998 more rows to get what you need, then concat the data from all the parsed cols back into a new col. then copy all 2000 lines of code in the new col to the VBA editor. finished.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,517

    Re: Multi level sorting - line continuation limit

    1)
    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code]

    2) Line continuation?
    You can use that sort method by 3 columns at a time, so you will need to loop from less priority column(s) to higher.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Multi-level sorting button
    By MagellanOfBass in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 12-01-2019, 02:07 PM
  2. Format the second level of multi-level category axis - clustered chart
    By mushkitoes in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-04-2018, 09:30 AM
  3. [SOLVED] creating Multi-level list styles using existing multi-level list?
    By JimmyWilliams in forum Word Formatting & General
    Replies: 2
    Last Post: 08-28-2017, 12:21 AM
  4. Multi-level Sorting Issue
    By Tejas.T in forum Excel General
    Replies: 5
    Last Post: 05-31-2014, 11:46 AM
  5. Bill of Materials conversion from multi level to single level
    By susmitpatel in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-11-2013, 12:53 AM
  6. Using macro to convert single level BOM to Multi Level BOM
    By andrew_chong in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-07-2006, 04:57 PM
  7. What is the limit of the line continuation in VB
    By mmamin in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2005, 08:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1