+ Reply to Thread
Results 1 to 8 of 8

Sorting worksheets

  1. #1
    Forum Contributor
    Join Date
    08-25-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    125

    Sorting worksheets

    Hi Everyone

    Could someone please tell me how to sort worksheets in a workbook alphabetically.

    Thanks

  2. #2
    Valued Forum Contributor Sadath31's Avatar
    Join Date
    03-02-2011
    Location
    Dammam, Saudi Arabia
    MS-Off Ver
    Office 365
    Posts
    452

    Re: Sorting worksheets

    this code will sort worksheet A-Z
    HTML Code: 

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting worksheets

    This should do it:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Forum Contributor
    Join Date
    08-25-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Sorting worksheets

    Thanks for the responses.
    I must say that I dont understand what you have replied. Please , if you dont mind explain to me what/how do I use the code.
    Regards
    Onesock

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting worksheets

    My apologies, this isn't the Programming Forum, so your VBA-only question slipped past me that you might not know how to use macros.

    How/Where to install the macro:

    1. Open up your workbook
    2. Get into VB Editor (Press Alt+F11)
    3. Insert a new module (Insert > Module)
    4. Copy and Paste in your code (given above)
    5. Get out of VBA (Press Alt+Q)
    6. Save as a macro-enabled workbook

    The macro is installed and ready to use. Press Alt-F8 and select it from the macro list.

  6. #6
    Forum Contributor
    Join Date
    08-25-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Sorting worksheets

    Thanks again

    This works great.
    Am I supposed to sign the macros. Im not very familiar with macros at all , but when I open my spreadsheet , a window pops up talks about security levels etc. Not really sure what this means , but it comes up everytime I open the spreadsheet.
    Please advise.

  7. #7
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting worksheets

    That is normal. The last thing you want to do is turn that warning off. You WANT to know anytime you're opening a workbook that has macros in it and you WANT the opportunity to specifically indicate to Excel to NOT allow the macros to work if you're not sure. It's a mild price to pay to keep your system a little safer from workbooks with unexpected code in them.

    If that takes care of your original question, please select Thread Tools from the menu above and mark the thread as solved. Thanks.

  8. #8
    Forum Contributor
    Join Date
    08-25-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    125

    Re: Sorting worksheets

    Thanks for the advice . Really appreciate it .

+ 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