+ Reply to Thread
Results 1 to 9 of 9

Move selected row up or down with a command button

  1. #1
    Registered User
    Join Date
    04-20-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    29

    Move selected row up or down with a command button

    I have a spreadsheet and want the user to be to click an up or down arrow that contains a macro to move the selected row up or down. So, where ever they click in the spreadsheet would set the focus for the row and then they can use the up/down arrows to change the position of that row. The focus should remain on the selected row until another row is selected.

    Thanks for your help.

    Tom

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Move selected row up or down with a command button

    Is this what you want??
    Attached Files Attached Files
    Gary's Student

  3. #3
    Registered User
    Join Date
    04-20-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Move selected row up or down with a command button

    Not exactly. It's not moving the data up or down.

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Move selected row up or down with a command button

    In this version the whole row of data moves up & down.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    04-20-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Move selected row up or down with a command button

    That's almost what I'm looking for but I don't want the rows above or below to be cleared. I want them to change positions.

  6. #6
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Move selected row up or down with a command button

    Give this a try:
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-20-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Move selected row up or down with a command button

    That is perfect! Thank you so much.

  8. #8
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Move selected row up or down with a command button

    Just be aware that we are using row #5000 as a helper row

  9. #9
    Registered User
    Join Date
    05-10-2016
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Move selected row up or down with a command button

    Thank you so mutch

+ 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