+ Reply to Thread
Results 1 to 12 of 12

Macro to move rows from one tab to another

  1. #1
    Registered User
    Join Date
    07-14-2012
    Location
    Aberdeen
    MS-Off Ver
    Excel 2010
    Posts
    11

    Macro to move rows from one tab to another

    Hi everyone.
    I have been asked to look at generating a macro which will move rows from one tab to another.
    I've created an example sheet and I want to move all rows in column E which are "Paid" from the Tracker tab to the Paid tab.
    Ideally (for filtering purposes), there should not be any blank rows left in the Tracker tab.
    Appreciate your help.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Macro to move rows from one tab to another

    HI,

    I will get back to with solution.

    Thanks - Naveed

  3. #3
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Macro to move rows from one tab to another

    Hi,

    U need macro or else excel function bcz this queries can resolve in two ways with macro as well as with excel function.

    which one do you want ?

    Thanks - Naveed.

  4. #4
    Registered User
    Join Date
    07-14-2012
    Location
    Aberdeen
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Macro to move rows from one tab to another

    Hi,
    I was looking at a macro, however if there is an excel funtion that dooes the same I would be interested.
    Personally I could live with manually cutting and pasting into the new tab, however I want this set up for someone to make it easier to transfer and less likely to lose data.

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to move rows from one tab to another

    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Macro to move rows from one tab to another

    Ok,

    one more thing i want know is u want paid info moved to paid tab and that paid info should delete from tracker tab or else paid info should show in tracker tab.

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to move rows from one tab to another

    Mark

    Right click on sheet (“Tracker”)-View code-Copy and paste this code, so it will reside on the tracker sheet.
    Whenever you change the status in column E of tracker sheet, entire row of that row will be copied in to paid sheet. All automatic. On the above code, I commented this line 'Target.EntireRow.Delete
    If wish to delete once the invoice has been paid, you need to remove the comment, so the row will be deleted from the tracker sheet

  8. #8
    Registered User
    Join Date
    07-14-2012
    Location
    Aberdeen
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Macro to move rows from one tab to another

    I want the Tracker tab to be clear of paid items once the macro has completed.
    The requirement is to move from one tab to the other.

  9. #9
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to move rows from one tab to another

    This is exactly what my code does. It deletes the row once the invoice is being paid. If you wish just to clear the row.

    Change this line
    Please Login or Register  to view this content.
    in to
    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    07-14-2012
    Location
    Aberdeen
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Macro to move rows from one tab to another

    Many thanks, the bolow works perfectly.
    I notice that you have to ensure there are no grouped columns in the trasker spreadsheet, but does what was asked on the tin.

    One again, many thanks

    Quote Originally Posted by AB33 View Post
    Please Login or Register  to view this content.

  11. #11
    Valued Forum Contributor Naveed Raza's Avatar
    Join Date
    11-04-2012
    Location
    India, Hyderabad
    MS-Off Ver
    Excel, Access 2007/2010
    Posts
    1,338

    Re: Macro to move rows from one tab to another

    Hi AB33 Sir,

    Thanks this is one very nice i don't we can use in this way also thanks u so much sir definetly i will work on this code.

  12. #12
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to move rows from one tab to another

    Ken
    Glad it has worked for you!
    Raza! Yes, it cuts out labourous work

+ 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