+ Reply to Thread
Results 1 to 4 of 4

VBA Script to Sort a row in ascending order, then go to next row and repeat

  1. #1
    Registered User
    Join Date
    09-09-2011
    Location
    Arizona, United States
    MS-Off Ver
    Excel 2007
    Posts
    19

    VBA Script to Sort a row in ascending order, then go to next row and repeat

    I have thousands of rows of 5 numbers in columns B-F that I need to sort horizontally in ascending order. I am trying to use VBA for this because I want each individual line to be in order.

    For an example.

    22 5 38 99 01 will need to be 01 05 22 38 99

    and so on for the next row under neath it. I tried recording a code but it keeps the rows in my recording. I'd like it to go to the next row "X" and sort for columns B-F and then repeat about 2000 times.

    Any suggestions on how to rewrite this?

    Thanks in advance.


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: VBA Script to Sort a row in ascending order, then go to next row and repeat

    Code for macro for sorting rows from 114 till end one by one.
    Please Login or Register  to view this content.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

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

    Re: VBA Script to Sort a row in ascending order, then go to next row and repeat

    Try
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    09-09-2011
    Location
    Arizona, United States
    MS-Off Ver
    Excel 2007
    Posts
    19

    Re: VBA Script to Sort a row in ascending order, then go to next row and repeat

    These work, thank you guys!

+ 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. [SOLVED] Sort in ascending order with same mark
    By kent97 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-05-2016, 08:55 AM
  2. Sort the final digits and sort in ascending order
    By jorel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-29-2014, 11:58 AM
  3. [SOLVED] Sort in ascending order
    By Glenn Kennedy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-07-2013, 08:11 AM
  4. [SOLVED] Sort Ascending order
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-16-2013, 02:27 PM
  5. [SOLVED] Sort in ascending order
    By Dibbley247 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-17-2013, 12:30 AM
  6. sort ascending order
    By iscar_marius in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 02-11-2009, 11:00 AM
  7. eliminate repeat values from a list of ascending order
    By norumbegan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-14-2006, 09:05 PM

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