+ Reply to Thread
Results 1 to 6 of 6

Eliminate Duplicates from an Array / Only Original Names

  1. #1
    Registered User
    Join Date
    04-14-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    66

    Eliminate Duplicates from an Array / Only Original Names

    Good morning everyone!

    I have an array in VBA, Ary1 (1 to 30, 1 to 1). It contains a list of names, some of which repeat multiple times. I want to take this list and only using VBA, and not entering the list into the spreadsheet, I want to eliminate all duplicate values from the array. So if there were say 10 original names in that list that only those would be left in the array (It can also be a new array if that is easier, I just need an array with only the original names).

    I have attached a spreadsheet that shows what I want to do. In column A I have the list of names, column B has the list of names with all the duplicates eliminated and replaced with blanks, and column C has only the original names. I want to avoid using a spreadsheet for this if possible. Please let me know if you have any ideas or suggestions. Thanks so much.

    Example.xls
    If you found this helpful, click the star

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Eliminate Duplicates from an Array / Only Original Names

    select the range then Data, Duplicate remove
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    04-14-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    66

    Re: Eliminate Duplicates from an Array / Only Original Names

    I understand how to do this. I am trying to do this in VBA though. The excel spreadsheet was just an example of what I am trying to do in VBA. Thanks.

  4. #4
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Eliminate Duplicates from an Array / Only Original Names

    Hi Rs15,
    maybe so
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-14-2013
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    66

    Re: Eliminate Duplicates from an Array / Only Original Names

    You are amazing!! Is there any way that you could give me a brief explanation as to what is going on here or point me in the right direction. There is some VBA here that I haven't ever seen before. Thanks!

  6. #6
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Eliminate Duplicates from an Array / Only Original Names

    You can find it here or in the many-many posts on this forum.

+ 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. how to eliminate duplicates.
    By comp23 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-28-2012, 07:59 AM
  2. [SOLVED] Need to eliminate duplicates and originals
    By geffsta in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-31-2012, 09:37 AM
  3. Eliminate Duplicates
    By TShelt in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-01-2011, 11:47 AM
  4. Eliminate duplicates in worksheets
    By maxebi in forum Excel General
    Replies: 3
    Last Post: 10-09-2010, 09:56 AM
  5. Replies: 5
    Last Post: 04-04-2005, 05:06 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