+ Reply to Thread
Results 1 to 8 of 8

Macro to combine cells and then delete duplicates......

  1. #1
    Registered User
    Join Date
    05-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    21

    Macro to combine cells and then delete duplicates......

    Hello Everyone,

    I'm trying to save myself hours of going through 100's of rows of data to manually combining cells and then deleting duplicates.

    I'm trying to locate a macro that would do the following:

    1) Go through Column C to locate identical values.

    2) If there is identical values in column C and the values in column A are different, combine both of those values into column A.

    So for example, on rows 65 & 66 I'd like for there to be only 1 row for "CLAIM_NO" 525533564 with "2325 / 2337" in cell A.

    Is this possible? I really appreciate the help.

    Combining cells.jpg

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,879

    Re: Macro to combine cells and then delete duplicates......

    Try a macro like this:

    Please Login or Register  to view this content.
    PS. Posting sample workbook not only picture makes answering easier - ona can check how the proposition works.

    For instance - if numbers in A are short - excel could try to "help you and change for instance "11 / 12" to date. But no file -> no testing.
    Last edited by Kaper; 02-05-2014 at 01:29 PM.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    05-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Macro to combine cells and then delete duplicates......

    Kaper,

    Wow! That almost does exactly what I need. It appears to be deleting the duplicates. However, it doesn't appear to be combining to correct values into column A.

    I've attached a copy of the workbook. I apologize, I didn't realize that was an option.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Macro to combine cells and then delete duplicates......

    Quote Originally Posted by Kaper View Post
    Try a macro like this:

    Please Login or Register  to view this content.
    PS. Posting sample workbook not only picture makes answering easier - ona can check how the proposition works.

    For instance - if numbers in A are short - excel could try to "help you and change for instance "11 / 12" to date. But no file -> no testing.

    Kaper can you help?

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

    Re: Macro to combine cells and then delete duplicates......

    There is a button on sheet1.
    If you want the out put to be on a separate sheet, I will change the code.
    Attached Files Attached Files

  6. #6
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,879

    Re: Macro to combine cells and then delete duplicates......

    Hi, minor change was needed (indeed I'd spot it with attachment):
    Please Login or Register  to view this content.

  7. #7
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,879

    Re: Macro to combine cells and then delete duplicates......

    once you test you will see that it deals also nicely with triplets like:
    1839 / 1841 / 1858 GSB 525528340

  8. #8
    Registered User
    Join Date
    05-01-2013
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Macro to combine cells and then delete duplicates......

    Kaper & AB33,

    Thank you both very much for your response. I really appreciate it!

+ 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 to find duplicates, concatenate cells, then delete old duplicates
    By givemepuppies in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 03-04-2016, 02:43 AM
  2. [SOLVED] Macro to find duplicates, concatenate Unique Values, then delete old duplicates
    By lesoies in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-17-2013, 04:32 PM
  3. Replies: 4
    Last Post: 01-05-2011, 11:37 PM
  4. combine cells and delete duplicates
    By megkelley in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 10-28-2007, 05:55 AM
  5. [SOLVED] combine row and the delete duplicates
    By bamamike in forum Excel General
    Replies: 2
    Last Post: 09-20-2005, 12:05 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