+ Reply to Thread
Results 1 to 7 of 7

Arranging worksheets in alphanumeric ascending order

  1. #1
    Registered User
    Join Date
    07-26-2012
    Location
    muzaffarabad ak
    MS-Off Ver
    Excel 2003
    Posts
    30

    Arranging worksheets in alphanumeric ascending order

    I am trying to arrange my sheets in alphabetical order.. I tried this code.. but it doesn't arrange sheets correctly

    Dim sCount As Integer, i As Integer, j As Integer
    Application.ScreenUpdating = False
    sCount = Worksheets.Count
    If sCount = 1 Then Exit Sub
    For i = 1 To sCount - 1
    For j = i + 1 To sCount
    If Worksheets(j).Name > Worksheets(i).Name Then
    Worksheets(j).Move Before:=Worksheets(i)
    End If
    Next j
    Next i

    (maybe sheets("1") doesn't mean sheets(1))..

  2. #2
    Registered User
    Join Date
    12-19-2014
    Location
    Athens
    MS-Off Ver
    2010
    Posts
    17

    Re: Arranging worksheets in alphanumeric ascending order

    Hello ahsanzafar.

    Try with the '<' (not '>') in the 'If' command.

  3. #3
    Registered User
    Join Date
    07-26-2012
    Location
    muzaffarabad ak
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Arranging worksheets in alphanumeric ascending order

    Doesn't work

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Arranging worksheets in alphanumeric ascending order

    May be
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  5. #5
    Registered User
    Join Date
    12-19-2014
    Location
    Athens
    MS-Off Ver
    2010
    Posts
    17

    Re: Arranging worksheets in alphanumeric ascending order

    It's work to me.
    If you want please to give the names of the sheets.

    PS: Anyway, you are right: 'sheets("1") doesn't mean sheets(1)'. All numbers, alphabetically precede the ". eg: Alphabetical first sorted 14, and followed by "13

  6. #6
    Registered User
    Join Date
    07-26-2012
    Location
    muzaffarabad ak
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Arranging worksheets in alphanumeric ascending order

    It work... thanx.. u saved my butt

  7. #7
    Registered User
    Join Date
    07-26-2012
    Location
    muzaffarabad ak
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Arranging worksheets in alphanumeric ascending order

    Solved... thanx

+ 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] Data validation special case (alphanumeric ascending order)
    By torers in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-30-2015, 06:25 AM
  2. Arranging Numbers in the following order
    By wings1080 in forum Excel General
    Replies: 2
    Last Post: 05-13-2015, 01:03 PM
  3. [SOLVED] VBA for arranging date and time in Ascending order
    By vanitarathod in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-12-2014, 03:59 AM
  4. Arranging two different columns in same order
    By TrevorMalcolm in forum Excel General
    Replies: 1
    Last Post: 04-24-2014, 06:22 AM
  5. [SOLVED] Arranging in order highest to lowest
    By neiluk121 in forum Excel General
    Replies: 7
    Last Post: 06-09-2012, 02:37 PM
  6. Replies: 1
    Last Post: 03-24-2010, 09:44 AM
  7. Replies: 7
    Last Post: 10-27-2009, 02:17 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