+ Reply to Thread
Results 1 to 3 of 3

Macro to move a name down in rankings

  1. #1
    Registered User
    Join Date
    03-15-2013
    Location
    Canada
    MS-Off Ver
    MS Office 2013 Professional
    Posts
    18

    Macro to move a name down in rankings

    Hey guys,

    I have a simple worksheet with 2 columns: Rank, and Name. I would like the ability to move a name up and down the rankings without having to cut, paste, move the rest of the names up, and paste in the empty slot. Ideally, I would like to run a macro that prompts me to select a new # for the ranking, and moves the name to that ranking.

    So the data would look like:

    Rank | Name
    1 | John
    2 | Bob
    3 | Fred
    etc.

    And what I would like to be able to do is select one of the cells (say, B4, "Fred") and call a macro, which then prompts me with a question like "What new ranking would you like to move this cell to?"; I would enter, say, 8, and it would move "Fred" to cell B9 (where Rank=8) and slide the rest, from Rank 4-8, up to Rank 3-7.

    A note: in actuality, I have 4 sets of rankings side by side on the sheet (so one is columns A:B, the next columns D:E, G:H, J:K), so I need it to generalize for that, not just work on columns A:B.

    I realize this is probably fairly simple, but I have absolutely no VBA experience and am not even really aware of the syntax of it, which is why I am here. Thanks in advance for your help.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Macro to move a name down in rankings

    Two Macros here

    Use one or both,

    One runs when you right click the other when you double click.

    Right click on the sheet name at the bottom of excel and select view code

    Paste the code in the window that opens and then close that window.

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Macro to move a name down in rankings

    Maybe try this out.
    Attached Files Attached Files
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

+ 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] Macro to Move Rows to New Worksheets Based on Criteria & Then HIDE & Move Back
    By abro0821 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-22-2014, 04:00 PM
  2. [SOLVED] 5 Check Boxes for rankings (1 - 5). Says no object when using macro.
    By Shrad013 in forum Word Programming / VBA / Macros
    Replies: 27
    Last Post: 01-16-2014, 12:58 PM
  3. [SOLVED] Macros To Move Multiple Rows To Another Sheet And Macro To Move Single Rows To DAX Table
    By jcaynes in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-22-2013, 05:08 PM
  4. converting weekly rankings into monthly rankings
    By sfinns in forum Excel General
    Replies: 6
    Last Post: 02-09-2012, 08:51 AM
  5. Macro to move a shape once and move it back again on sequential presses.
    By ynot2010 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-14-2010, 07:05 AM
  6. How to click macro - Move right 15 cells - Next click move back to home position
    By Launchnet in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-05-2010, 10:47 PM
  7. Replies: 1
    Last Post: 07-14-2008, 03:24 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