+ Reply to Thread
Results 1 to 6 of 6

Delete Duplicate Cells in column

  1. #1
    Forum Contributor
    Join Date
    02-20-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    467

    Delete Duplicate Cells in column

    I want code to delete cells in columns A:E in attachment a so that it looks like attachment b when finished.

    Thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Delete Duplicate Cells in column

    Here you go:
    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    04-16-2009
    Location
    Malmo
    MS-Off Ver
    Excel 2007
    Posts
    7

    [SOLVED] Re: Delete Duplicate Cells in column

    Quote Originally Posted by JBeaucaire View Post
    Here you go:
    Please Login or Register  to view this content.
    I want to do exactly the same but only to column C. Would you, please, modify the code so it removes duplicates from C only, and post it here?!

    Can you also explain where to put this code?!

    Thanks for the help.
    Last edited by Geir; 04-26-2009 at 04:48 AM.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Delete Duplicate Cells in column

    1. Open up your workbook.
    2. Get into VB Editor (Press Alt+F11)
    3. Insert a new module (Insert > Module)
    4. Copy and Paste in your code (given above)
    5. Get out of VBA (Press Alt+Q)
    6. Save your sheet.
    Press Alt-F8 to run the macro ClearDupeValues. If it does what you want, great. If not, close book without saving and explain your requirement further. This macro duplicates your results as originally posted, it only does that.

  5. #5
    Registered User
    Join Date
    04-16-2009
    Location
    Malmo
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Delete Duplicate Cells in column

    Thanks for quick reply.

    I ran the macro but it produced mixed results. I then took column C only to a new sheet and ran and the macro. It worked!

    Is it possible to make this work on the original sheet, but only to remove duplicates from column C only?!

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Delete Duplicate Cells in column

    This is for column C only. I made the "C" references easier to spot so you can understand this better and perhaps tweak it yourself.

    Please Login or Register  to view this content.
    If that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]

+ 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