+ Reply to Thread
Results 1 to 6 of 6

How can I avoid duplicate data in cells

  1. #1
    Registered User
    Join Date
    11-06-2015
    Location
    NJ, USA
    MS-Off Ver
    2007
    Posts
    3

    Question How can I avoid duplicate data in cells

    Hello everyone,

    I'm only familiar with the basics of Excel, and recently came across a need to narrow down some duplicate data within a single column. I'll try my best to explain what I'm shooting for. Any guidance is much appreciated.

    I have ID numbers in a single column. Some of these ID numbers appear more than once in the same column. I'd like to run a filter (or something similar) to do 1 of 2 things:

    Identify the cells with identical data and then only display those cells. This will at least help me identify how many times the same ID number appears in the column.

    OR, better yet...

    Identify identical data and only show 1 result for that match, so that only each ID number is only displayed once. This would be best (easiest) since it would let me know immediately how many unique ID numbers appear in the column.

    Please let me know if additional info would help out.

    Thanks all!

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How can I avoid duplicate data in cells

    Welcome to the Forum!



    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    11-06-2015
    Location
    NJ, USA
    MS-Off Ver
    2007
    Posts
    3

    Re: How can I avoid duplicate data in cells

    Thanks for showing me that! I went with the manual mock up approach and added some notes as well.

    One thing worth noting is that the other column data doesn't factor into my goal at all. For example, ID Number 123 appears on both 1/1/2015 and again on 1/5/2015, but for what I need it wouldn't matter which of those 2 occurrences of ID Number 123 I pulled up, I just need to identify each ID Number 1 time. At the moment my total ID Numbers appears inflated, since some ID Numbers appear more than once.

    Thanks again!
    Attached Files Attached Files

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How can I avoid duplicate data in cells

    Hi Zano,

    Try this:

    Please Login or Register  to view this content.
    Directions for running the routine(s) just supplied

    If you haven't used macros before you'll need to go to:
    File- options - trust center -trust center settings - macro settings ,
    the second option down (disable all macros with notification)

    Then - Copy the code to the clipboard

    Open your Workbook

    Press ALT + F11 to open the Visual Basic Editor.

    Select "Module" from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    *Be sure to save the book with the code as Macro-Enabled

  5. #5
    Registered User
    Join Date
    11-06-2015
    Location
    NJ, USA
    MS-Off Ver
    2007
    Posts
    3

    Re: How can I avoid duplicate data in cells

    Hi everyone!

    I wanted to follow up that I did get my answer, but first, a big thank you to xladept for all your help and support! I didn't end up using your macro, but your efforts were much appreciated.

    What I did end up doing to satisfy my objective is:
    1. Select All columns with data.
    2. Click Data in the Ribbon tabs.
    3. Click Remove Duplicates from the options under Data.
    4. Click Unselect All, then fill in the checkbox of the 1 column that I wanted to remove duplicate data.
    5. Click OK to remove duplicate data from the 1 specified column. This now shows me only the unique data from that column, with no duplicates.

    Thanks again!

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How can I avoid duplicate data in cells

    You're welcome and thanks for the rep!

+ 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] Set up avoid duplicate problem
    By aleman_li in forum Excel General
    Replies: 2
    Last Post: 04-23-2015, 10:12 AM
  2. Replies: 2
    Last Post: 11-26-2014, 08:24 PM
  3. Hey, every genius, How to avoid duplicate items in random selection from data?
    By bryansky in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-23-2013, 11:19 PM
  4. [SOLVED] Avoid duplicate data entry in the range of column "E"
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-01-2012, 02:01 PM
  5. Avoid Duplicate Names
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2010, 01:48 PM
  6. Avoid Duplicate Records
    By Amarjeet Singh in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 01-22-2009, 09:05 PM
  7. How do I avoid copying data into blank cells
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-08-2006, 01:40 PM

Tags for this Thread

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