+ Reply to Thread
Results 1 to 5 of 5

Clear cell contents of duplicates within column

  1. #1
    Registered User
    Join Date
    09-04-2012
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    35

    Clear cell contents of duplicates within column

    Hi,

    I know there are a lot of posts on duplicates here but I can't seem to find anything that fits my description. I have a column of data that generally looks like this:

    ABC00001
    ABC00002
    ABC00003

    ABC00004
    ABC00005

    etc, etc.

    There are sometimes blank cells in between and the numbering is not necessarily in order. I have another macro that runs on a BeforeSave event to create these values. Now, there are multiple users that use my file and sometimes they will copy a row and insert it as a new row in the sheet as a quicker way of adding information to the spreadsheet, but this duplicates the numbering system I built and the values need to be unique. In order to do that, I need a macro that will look at this column and remove duplicates so that my other macro will generate a unique value in the blank cell. (My macro doesn't touch the row once there is a value). Is there a simple macro that can be created (or incorporated into my existing macro) that will remove any duplicates in column G before my other macro runs. When I say remove duplicates, I mean clear contents of the cell, not delete the cell or row. Thanks!

  2. #2
    Registered User
    Join Date
    09-04-2012
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: Clear cell contents of duplicates within column

    Is there anyone who could potentially help with this? I'm a vba novice and I am having no luck. I'd really appreciate it, thanks!!

  3. #3
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Clear cell contents of duplicates within column

    Probably i can't help you, but i think you get more responce if you add your code or excel file, without confidentional information.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  4. #4
    Registered User
    Join Date
    09-04-2012
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: Clear cell contents of duplicates within column

    Attached is a sample file. Column G is the column in question. Rows 30 and 31 are duplicates of 28 and 29 and so the values in column G should be cleared. Thanks for the advice! Hopefully someone can help.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-04-2012
    Location
    NY
    MS-Off Ver
    Excel 2010
    Posts
    35

    Re: Clear cell contents of duplicates within column

    Solved it myself with a ton more Googling.

    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)

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