+ Reply to Thread
Results 1 to 4 of 4

Add Names in Text File to List in Excel Column if Unique

  1. #1
    Registered User
    Join Date
    03-02-2020
    Location
    Augsburg, Germany
    MS-Off Ver
    Office 2016
    Posts
    2

    Add Names in Text File to List in Excel Column if Unique

    Hello,

    I am new in this forum and would like to ask for a solution code in VBA which I cannot create by myself. I know some VBA coding but I cannot find a solution to this problem:

    - List of names in a text file "names.txt" - each line is a name
    - Excel table "names" in worksheet "sheet1", in column A are a list of names. Each row is a name

    1) I want to check the column A for duplicates and if there are duplicates to eliminate them
    2) I want to import the list of names from "names.txt" in the column A if there isn't already a row with the same name as in "names.txt"

    My goal is to have a list of unique names in the teble "names" in column A


    Thank you for your help - I really appreciate it!

    Tony
    Attached Files Attached Files

  2. #2
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,855

    Re: Add Names in Text File to List in Excel Column if Unique

    While it is possible to do in steps you requested. For speed and ease of maintenance. I'd recommend taking advantage of "Remove Duplicate" process in Excel.

    Import txt file and add it to end of current list. Then apply remove duplicates.

    Ex:
    Please Login or Register  to view this content.
    NOTE: I can't remember off top of my head the exact limit, but Application.Traspose may have limit on number of array elements it can transpose at once. If I recall, it's some where around 65k.
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  3. #3
    Registered User
    Join Date
    03-02-2020
    Location
    Augsburg, Germany
    MS-Off Ver
    Office 2016
    Posts
    2

    Re: Add Names in Text File to List in Excel Column if Unique

    Thank you very much! It works just fine!

  4. #4
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    Office 365 ProPlus
    Posts
    5,855

    Re: Add Names in Text File to List in Excel Column if Unique

    You are welcome

+ 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. populate unique list of names from a column
    By Excelski in forum Excel General
    Replies: 2
    Last Post: 06-15-2017, 10:02 AM
  2. [SOLVED] Unique names list from data validation column
    By L plates in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-01-2017, 07:08 PM
  3. Search for file names and list them in column A
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-24-2016, 01:52 AM
  4. [SOLVED] list unique names as a column
    By deanusa in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-10-2015, 12:49 PM
  5. Replies: 3
    Last Post: 08-02-2015, 03:50 AM
  6. Replies: 3
    Last Post: 04-16-2013, 01:44 PM
  7. Replies: 6
    Last Post: 07-08-2012, 03:54 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