+ Reply to Thread
Results 1 to 7 of 7

Compare 2 sheets and delete duplicate rows

  1. #1
    Registered User
    Join Date
    06-09-2011
    Location
    England
    MS-Off Ver
    Excel 2022
    Posts
    8

    Compare 2 sheets and delete duplicate rows

    Hi

    I have a macro which transfers data from sheet 2 onto sheet 3 if certain criteria is met.

    This works fine but i need to delete the rows from sheet 2 once the data has been transfered.

    Is there a seperate code for this?Project_Review_Summary_TEST_V2.1(1).xls

    Also is there a code to take sheet 1 tables and export onto word document?

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Compare 2 sheets and delete duplicate rows

    I inserted the following code after the line Sheets(2).Select

    Please Login or Register  to view this content.
    you have to substract 1 to you LSearchRow because you just deleted one.
    Pierre
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-09-2011
    Location
    England
    MS-Off Ver
    Excel 2022
    Posts
    8

    Re: Compare 2 sheets and delete duplicate rows

    Simple as that.....Thanks.

    Dont suppose you know a code to copy sheet 1 into word?

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Compare 2 sheets and delete duplicate rows

    here is a place where you will find your information:

    http://www.exceltip.com/st/Copy_work...Excel/481.html
    regards
    Pierre

  5. #5
    Registered User
    Join Date
    06-09-2011
    Location
    England
    MS-Off Ver
    Excel 2022
    Posts
    8

    Re: Compare 2 sheets and delete duplicate rows

    Quote Originally Posted by p24leclerc View Post
    I inserted the following code after the line Sheets(2).Select

    Please Login or Register  to view this content.
    you have to substract 1 to you LSearchRow because you just deleted one.
    Pierre
    I have an issue with the code, it wont search the next blank cell and paste the copied tems, it is paste over the same cell.

  6. #6
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Compare 2 sheets and delete duplicate rows

    I think you want to copy the new records at the end of the existing ones in the sheet Invoiced. To do this, you have to set the row number where to copy the data by the formula below:

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    06-09-2011
    Location
    England
    MS-Off Ver
    Excel 2022
    Posts
    8

    Re: Compare 2 sheets and delete duplicate rows

    Thanks for your help.

+ 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