+ Reply to Thread
Results 1 to 6 of 6

VBA - Macro to move rows from one worksheet to another

  1. #1
    Registered User
    Join Date
    03-15-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    9

    VBA - Macro to move rows from one worksheet to another

    Hi, new to VBA...my wife bought me VBA for Dummies for Christmas So I'm trying..
    At work I keep an Action Register used by many departments so it's lengthy. What I'm trying to do is create a macro that moves actions of a specific status i.e. pending, in progress, complete etc to a different worksheet. So if I run the macro it would move all the completed rows/actions into a worksheet call completed actions etc.
    I've tried recording a macro using 'if' but it simply copies one row over and over writes what was previously there - so partial success of sorts but of no use.
    Any help appreciated.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,026

    Re: VBA - Macro to move rows from one worksheet to another

    A Worksheet_Change macro could do this for you automatically as you enter the 'status'. In which column is the 'status'? Do you enter it manually or do you choose the status from a drop down list? Do you want to move the rows to the "Completed Actions" worksheet only if the status is "Complete" or if the status is any of "pending, in progress, complete"?
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    03-15-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: VBA - Macro to move rows from one worksheet to another

    Thanks MUMPS1, yes that is exactly what I want to do and exactly as I envisage it working. Is worksheet_change a function?

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,026

    Re: VBA - Macro to move rows from one worksheet to another

    OK. I need answers to the questions I put in Post #2. If you can attach a copy of your file, that would make things much easier.

  5. #5
    Registered User
    Join Date
    03-15-2013
    Location
    UK
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: VBA - Macro to move rows from one worksheet to another

    Hi Mumps, okay. The status is in Column E and is chosen from a drop down list. Also only to move when the status indicates Complete.

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 365
    Posts
    8,026

    Re: VBA - Macro to move rows from one worksheet to another

    Copy and paste this macro into the worksheet code module. Do the following: right click the tab for the sheet containing your data and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. The macro is triggered by a change in any cell in column E so you must make sure that the data in all the other columns is entered first and the selection in column E is made last. Also the macro assumes that column A will always have data in it.

    Please Login or Register  to view this content.

+ 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. Macro that will splits the rows and then move each new section to a new worksheet.
    By taylorsm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-06-2018, 03:34 PM
  2. [SOLVED] Macro: Move Duplicate Rows From One Worksheet To Another
    By dave7182 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-06-2014, 04:56 PM
  3. [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
  4. [SOLVED] Macro to select rows with appropriate dates and move them into a new worksheet
    By catteeya in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-12-2014, 03:37 PM
  5. [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
  6. Macro to move rows with specific content to another worksheet
    By Bobbington in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 09-24-2012, 11:05 AM
  7. Macro to move specific rows from one worksheet to another
    By LaughingLaurie in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-26-2012, 02:33 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