+ Reply to Thread
Results 1 to 6 of 6

Copied VBA not working

  1. #1
    Forum Contributor Marvo's Avatar
    Join Date
    01-15-2009
    Location
    Northampton, England
    MS-Off Ver
    Excel 2021
    Posts
    990

    Copied VBA not working

    Hi Guys, in the attached workbook on worksheet "Attendance All-Time" I have an update button that sorts by Column Q (Descending) and then by Column A (Ascending). It works perfectly.

    I've copied this VBA on to worksheet "Prize Winners" and have edited the code to sort by Column Q (Descending) and Column R (Ascending) but it doesn't work.

    I'm new to this to it's probably something very simple I've overlooked.

    Many thanks.
    Attached Files Attached Files
    Last edited by Marvo; 03-26-2024 at 10:49 AM.

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,205

    Re: Copied VBA not working

    What is in error? It looks OK to me.
    Last edited by JohnTopley; 03-26-2024 at 10:34 AM.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Forum Contributor Marvo's Avatar
    Join Date
    01-15-2009
    Location
    Northampton, England
    MS-Off Ver
    Excel 2021
    Posts
    990

    Re: Copied VBA not working

    Column R sorts out the names alphabetically. (Surname)

  4. #4
    Forum Contributor Marvo's Avatar
    Join Date
    01-15-2009
    Location
    Northampton, England
    MS-Off Ver
    Excel 2021
    Posts
    990

    Re: Copied VBA not working

    Yes sorry, John, it is working now. Seems to be a bit temperamental, sometimes doesn't work first time you click the button. Never mind, its reassuring managed to set it up right. Thank you.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,205

    Re: Copied VBA not working

    Column R returns a ID number based on Name.

    Sorting R makes no sense: All you want is that the sort on Q results and the whole table being correct and hence R will be correct.

    John MARVESLEY is ID 91 and the leader based on winnings.


  6. #6
    Forum Contributor Marvo's Avatar
    Join Date
    01-15-2009
    Location
    Northampton, England
    MS-Off Ver
    Excel 2021
    Posts
    990

    Re: Copied VBA not working

    John Marvesley is the 91st person alphabetically. I was looking for a way of sorting two people when they have the same total, alphabetically seemed to be the way to go. Can't sort the names Alphabetically in column B as it will do it from first name.

+ 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. Cmd Button and Macros not working on copied worksheet or copied to New Book
    By Andy C. in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-02-2021, 05:03 PM
  2. hyperlink not working when copied and pasted
    By scouse13 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-11-2020, 06:56 PM
  3. Copied working macro to new workbook, but no longer working
    By twisted31 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-23-2017, 06:17 PM
  4. Insert copied cells is not working.
    By santosh arava in forum Excel General
    Replies: 2
    Last Post: 07-16-2015, 03:03 AM
  5. Sub copied from one workbook to second not working
    By jdfjab in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-07-2012, 07:24 AM
  6. Copied formulas not working
    By brosato in forum Excel General
    Replies: 2
    Last Post: 10-14-2011, 06:02 AM
  7. [SOLVED] Copied worksheet not working
    By [email protected] in forum Excel General
    Replies: 0
    Last Post: 06-15-2006, 03:10 PM

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