+ Reply to Thread
Results 1 to 12 of 12

VB Code to find Unique Names

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to find Unique Names

    Hello:

    Please refer to attached file.
    I have list of Names in Column A as shown in Sheet1.
    I need a unique list in Column C starting in cell C2.

    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VB Code to find Unique Names

    copy the column to c and remove duplicates

    or
    with this code

    Please Login or Register  to view this content.
    kind regards
    Leo

  3. #3
    Forum Contributor
    Join Date
    04-15-2015
    Location
    beirut
    MS-Off Ver
    2010
    Posts
    107

    Re: VB Code to find Unique Names

    try this file
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to find Unique Names

    Hi LeoTaxi:

    Code works great...one more request...can you please add the code so that the list is sorted alphabetically.

    Thanks a lot

    Riz

  5. #5
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VB Code to find Unique Names

    Ok Riz, here it is

    Please Login or Register  to view this content.
    Kind regards
    Leo

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: VB Code to find Unique Names

    Or
    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: VB Code to find Unique Names

    @bakerman
    Great code and very useful
    How can avoid case sensitive?
    I mean if "Yasser" and "YASSER" are found then just one of them to remain and the other not to be included
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  8. #8
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: VB Code to find Unique Names

    Hi YasserKhalil

    Try this slight modification on bakerman2's nifty tst macro:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  9. #9
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: VB Code to find Unique Names

    Quote Originally Posted by bakerman2 View Post
    Or
    Please Login or Register  to view this content.
    Should post after testing...

    ArrayList can not compare multi data types like

    121
    13
    1156
    Q
    B
    C

  10. #10
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: VB Code to find Unique Names

    This one, too.
    Quote Originally Posted by Trebor76 View Post
    Hi YasserKhalil

    Try this slight modification on bakerman2's nifty tst macro:

    Please Login or Register  to view this content.
    Regards,

    Robert
    Alternative
    Please Login or Register  to view this content.

  11. #11
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,908

    Re: VB Code to find Unique Names

    @ trebor76
    Thanks for the rep

    @YasserKhalil
    Thanks for the rep

    @jindon
    Should post after testing...

    ArrayList can not compare multi data types like
    Question was "Find Unique Names in list of Names" and since there were no different datatypes in example file my solution tested out just fine before I posted it.

  12. #12
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Lightbulb Re: VB Code to find Unique Names


    Hi !

    If a title is in A1 cell, only one statement to obtain a no duplicate list via AdvancedFilter method !

    With another codeline to sort the list …

+ 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] Need vba code to make sum and average of row depends upon unique names in col A
    By breadwinner in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-02-2015, 02:54 AM
  2. vba find unique names in multiple columns
    By Konexcelmath in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-26-2014, 09:10 PM
  3. Find unique names in certain range.
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 07-22-2014, 04:00 PM
  4. VB Code to find Unique Numbers
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-26-2014, 03:58 PM
  5. [SOLVED] Code To Find Unique Entries
    By NeedForExcel in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-14-2013, 10:36 AM
  6. Excel 2007 - Formula or VBA to find unique names and return values?
    By kjwaller in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-02-2013, 09:09 PM
  7. [SOLVED] Find unique names and count their status
    By webstmonkey in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-14-2013, 01:17 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