+ Reply to Thread
Results 1 to 5 of 5

how do i sort excel worksheets by alphabetical order?

  1. #1
    Birichica
    Guest

    how do i sort excel worksheets by alphabetical order?

    if I have 50 worksheets and I name them, how can i sort them in alphabetical
    order?

  2. #2
    JulieD
    Guest

    Re: how do i sort excel worksheets by alphabetical order?

    Hi

    check out
    http://www.cpearson.com/excel/sortws.htm

    for details

    Cheers
    JulieD

    "Birichica" <[email protected]> wrote in message
    news:[email protected]...
    > if I have 50 worksheets and I name them, how can i sort them in
    > alphabetical
    > order?




  3. #3
    Peo Sjoblom
    Guest

    Re: how do i sort excel worksheets by alphabetical order?

    You need macro for that


    http://www.cpearson.com/excel/sortws.htm

    --

    Regards,

    Peo Sjoblom


    "Birichica" <[email protected]> wrote in message
    news:[email protected]...
    > if I have 50 worksheets and I name them, how can i sort them in

    alphabetical
    > order?




  4. #4
    Don S
    Guest

    Re: how do i sort excel worksheets by alphabetical order?

    On Wed, 23 Feb 2005 06:49:07 -0800, Birichica
    <[email protected]> wrote:

    >if I have 50 worksheets and I name them, how can i sort them in alphabetical
    >order?

    Go to ASAP-Utilities.com. It will do that exact thing and so much
    more you'll need a towel to wipe the drool off your chin ... and it's
    FREE!

    Don S

  5. #5
    Bernie Deitrick
    Guest

    Re: how do i sort excel worksheets by alphabetical order?

    Birichica,

    You need to use code.

    From

    http://www.cpearson.com/excel/sortws.htm

    Sorting Worksheets In Alphabetical Order
    In some applications, it may be useful to have the worksheets in
    alphabetical order. For example, if you have a worksheet for each employee
    on a team and each employee has their own worksheet, you may want these
    sheets in alphabetical order. You could do this manually, but if you have
    more than a few sheets, it would be easier to automate the task. Excel
    does not have a built in tool to do this, but you can use some fairly simple
    VBA code accomplish this.
    The following code will sort the sheets in the workbook, in alphabetical
    order.

    Sub SortWorksheets()

    Dim N As Integer
    Dim M As Integer
    Dim FirstWSToSort As Integer
    Dim LastWSToSort As Integer
    Dim SortDescending As Boolean

    SortDescending = False

    If ActiveWindow.SelectedSheets.Count = 1 Then
    FirstWSToSort = 1
    LastWSToSort = Worksheets.Count
    Else
    With ActiveWindow.SelectedSheets
    For N = 2 To .Count
    If .Item(N - 1).Index <> .Item(N).Index - 1 Then
    MsgBox "You cannot sort non-adjacent sheets"
    Exit Sub
    End If
    Next N
    FirstWSToSort = .Item(1).Index
    LastWSToSort = .Item(.Count).Index
    End With
    End If

    For M = FirstWSToSort To LastWSToSort
    For N = M To LastWSToSort
    If SortDescending = True Then
    If UCase(Worksheets(N).Name) > UCase(Worksheets(M).Name) Then
    Worksheets(N).Move Before:=Worksheets(M)
    End If
    Else
    If UCase(Worksheets(N).Name) < UCase(Worksheets(M).Name) Then
    Worksheets(N).Move Before:=Worksheets(M)
    End If
    End If
    Next N
    Next M

    End Sub


    HTH,
    Bernie
    MS Excel MVP

    "Birichica" <[email protected]> wrote in message
    news:[email protected]...
    > if I have 50 worksheets and I name them, how can i sort them in

    alphabetical
    > order?




+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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