+ Reply to Thread
Results 1 to 7 of 7

Sort Largest to smallest automatically

  1. #1
    Registered User
    Join Date
    05-06-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Sort Largest to smallest automatically

    Hi there
    I have a spreadsheet where I would like to sort largest to smallest automatically as the numbers are updated. Column A is the name and Column B the number.
    Could anyone help?
    Example attached
    Kind regards
    John
    Attached Files Attached Files

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Sort Largest to smallest automatically

    Try pasting this into the Sheet2 tab in the VBA editor (alt F11)

    Please Login or Register  to view this content.
    Martin

  3. #3
    Registered User
    Join Date
    05-06-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Sort Largest to smallest automatically

    Hi there
    Thanks - i have tried to type the code in to the VBA editor using:
    On the Tools menu in Microsoft Excel, point to Macro, and then click Visual Basic Editor.
    On the Insert menu, click Module.
    Type or copy your code into the code window of the module.
    If you want to run the macro from the module window, press F5.
    When you're finished writing your macro, click Close and Return to Microsoft Excel on the File menu.

    but when I try to run the macro it can't be found.
    Please forgive my ignorance
    Cheers
    John

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Sort Largest to smallest automatically

    It needs to go on the Sheet2 tab and not in a new module. You should be able to open the Sheet2 tab by clicking Sheet2 in the project explorer in the top left hand corner.

  5. #5
    Registered User
    Join Date
    05-06-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Sort Largest to smallest automatically

    Hi
    I get the following - I'm obviously still doing something wrong
    Cheers
    John
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    03-20-2011
    Location
    UK
    MS-Off Ver
    Excel 2007/10/16
    Posts
    840

    Re: Sort Largest to smallest automatically

    mrice say in sheet2. Press (alt F11) then put code in in VBA Sheet2.

    Here the file as it working fine.
    Attached Files Attached Files
    To help you by my post? it would be nice to click on to say "Thank you".
    If you are happy with a solution to your problem?
    Click Thread Tools above your first post,
    select "Mark your thread as Solved".

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Sort Largest to smallest automatically

    if you dont want tu use VBA, try the attached. you can hide what you dont need to be visible
    Attached Files Attached Files
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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