+ Reply to Thread
Results 1 to 5 of 5

Import data from TXT file and paste into Cell

  1. #1
    Registered User
    Join Date
    01-25-2011
    Location
    Vancouver
    MS-Off Ver
    Excel 2007
    Posts
    7

    Question Import data from TXT file and paste into Cell

    What I am trying to do is simple. Import all contents of text file at eg: c:\test\test.txt and paste into cell B:1 for example. The only data in said text file is "123456". This is not CSV or anything fancy.. just a single number string that I need to import using a macro.

    Could somebody please help me out? Greatly Appreciated!

    -Dave

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Import data from TXT file and paste into Cell

    If your data is on just the first line of the file then this will work:
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    05-18-2013
    Location
    Jakarta
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Import data from TXT file and paste into Cell

    Hello!

    In my case, I have several text files with sequence number on filename, e.g: day1.txt, day2.txt, etc.
    Each files contain a hundred to thousand lines of barcode number:
    B00009WE45
    B0015YISKO
    B007RFW1NA
    ...etc

    How to group those data into one workbook in a row for each files as below?
    Column1 Column2
    day1 barcode-list
    day2 barcode-list
    ...etc

    I really high appreciate if somebody could help me.

    Thank you.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Import data from TXT file and paste into Cell

    vihanay,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  5. #5
    Registered User
    Join Date
    05-18-2013
    Location
    Jakarta
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Import data from TXT file and paste into Cell

    Uppss... sorry for my careless

+ 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