+ Reply to Thread
Results 1 to 6 of 6

Find duplicates in column B, keep value from first instance in A, and replace B:H

  1. #1
    Registered User
    Join Date
    03-10-2014
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    42

    Find duplicates in column B, keep value from first instance in A, and replace B:H

    Title pretty much says it all. I need a macro that will find duplicates in column B, there will never be more than one duplicate for each row, and keep the value in A from the first occurrence, but replace B:H values with the values in the duplicate occurrence, then delete the duplicate occurrence. Given that I'm very much down to the wire on this one I have also posed this question in a thread in which I was trying to solve a similar problem here: http://www.mrexcel.com/forum/excel-q...ml#post3764393.

    Been googling for awhile to no avail, help is appreciated!
    Last edited by votekinky06; 03-31-2014 at 08:07 AM.

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Re: Find duplicates in column B, keep value from first instance in A, and replace B:H


    Better to clarify with an attached workbook with a source worksheet and an expected result worksheet …

  3. #3
    Registered User
    Join Date
    03-10-2014
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Find duplicates in column B, keep value from first instance in A, and replace B:H

    Thanks for looking, here ya go!

    Master Forum Sample Initial State.xlsm

    This is a much shortened version for simplicity, there will usually be a couple of thousand rows and the number of rows will be variable.


    Quote Originally Posted by Marc L View Post

    Better to clarify with an attached workbook with a source worksheet and an expected result worksheet

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Cool Try this !


    Several ways to achieve it but this is the easy way to understand for beginner,
    code to insert in the worksheet module :

    Please Login or Register  to view this content.
    Last edited by Marc L; 03-31-2014 at 11:13 AM.

  5. #5
    Registered User
    Join Date
    03-10-2014
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    42

    Re: Try this !

    Quote Originally Posted by Marc L View Post

    Several ways to achieve it but this is the easy way to understand for beginner,
    code to insert in the worksheet module :

    Please Login or Register  to view this content.
    Any way to change the paste range to where it doesn't paste past column H? I have data in K and L that I need to preserve.

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    5,124

    Re: Find duplicates in column B, keep value from first instance in A, and replace B:H


    Just change the cells number to copy ‼
    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. [SOLVED] Find and replace second instance
    By ammartino44 in forum Excel General
    Replies: 3
    Last Post: 01-17-2014, 03:39 PM
  2. Replies: 3
    Last Post: 10-08-2013, 09:46 AM
  3. [SOLVED] Find and Replace first instance of word Only
    By ScabbyDog in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-18-2013, 01:14 PM
  4. [SOLVED] find and replace for instance
    By nicktater in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2013, 04:42 PM
  5. Replies: 12
    Last Post: 12-31-2012, 04:13 AM

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