+ Reply to Thread
Results 1 to 11 of 11

Macro to move a selected row from one table to another table

  1. #1
    Registered User
    Join Date
    04-19-2015
    Location
    Durham
    MS-Off Ver
    Excel 2013
    Posts
    22

    Macro to move a selected row from one table to another table

    Hey,

    I have a sheet ("TEST") and two tables on that sheet ("AC) and ("CC"). Columns widths are the same, and one table ("AC") is just above the other table ("CC")
    I have a button that when clicked needs to move the row I select from ("AC") to a new row at the bottom of another table ("CC").

    Note I said move, not copy, as I don't wish to have duplicate rows.

    Any help would be great!

    Excel 2016
    Last edited by heyryy; 12-05-2018 at 01:07 AM. Reason: Clarification

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,657

    Re: HELP: Macro to move a selected row from one table to another table

    Please attach a short excel sample of your data
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    04-19-2015
    Location
    Durham
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: HELP: Macro to move a selected row from one table to another table

    Here you are. Thanks!
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by heyryy; 12-05-2018 at 01:36 AM.

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,657

    Re: HELP: Macro to move a selected row from one table to another table

    What sort of button you have or wish to have ?
    Why not a shortkey on the keyboard

  5. #5
    Registered User
    Join Date
    04-19-2015
    Location
    Durham
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: HELP: Macro to move a selected row from one table to another table

    A cell that they can press is sufficient.

    Ryan

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,657

    Re: HELP: Macro to move a selected row from one table to another table

    See next code
    Assign macro to a key, in file attached use Control + a to launch the macro
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    04-19-2015
    Location
    Durham
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: HELP: Macro to move a selected row from one table to another table

    Thanks for this. Almost perfect!

    Just two 'small' things:

    1. How to delete the original row?
    2. When the row is copied to the new table, can it copy the row width too?

  8. #8
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,657

    Re: HELP: Macro to move a selected row from one table to another table

    1. How to delete the original row?
    See next code
    Please Login or Register  to view this content.
    Next point to come

  9. #9
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,657

    Re: Macro to move a selected row from one table to another table

    Finally see last code
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    04-19-2015
    Location
    Durham
    MS-Off Ver
    Excel 2013
    Posts
    22

    Re: Macro to move a selected row from one table to another table

    Fantastic, thanks!

  11. #11
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    4,657

    Re: Macro to move a selected row from one table to another table

    You are welcome
    Enjoy Excel

+ 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. Replies: 11
    Last Post: 04-29-2017, 07:23 PM
  2. Replies: 1
    Last Post: 10-10-2016, 01:17 PM
  3. [SOLVED] table(A) as an array using all rows but only selected columns to compare with table(B)
    By se3unlock in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-27-2015, 10:15 AM
  4. [SOLVED] Lines move from table to anothre table with the function small
    By sportfan in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-24-2015, 03:59 PM
  5. [SOLVED] Code to move data from an entry table to a historical table by date.
    By rlh in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-17-2014, 11:04 AM
  6. [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
  7. Macro to move a row from one table to another
    By John in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 01-09-2006, 02:10 PM

Tags for this Thread

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