+ Reply to Thread
Results 1 to 6 of 6

HELP with code for copy of some rows from Text file to Excel cells

  1. #1
    Registered User
    Join Date
    10-26-2012
    Location
    Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    3

    HELP with code for copy of some rows from Text file to Excel cells

    I have a text file (NOTEPAD) and from there i need a copy some values (10 characters of each row) to Excel cells.

    Example

    X: +1289.7921 +1287.0000 +000.0000 +000.0000 +0002.7921 +0002.7921
    Z: +0247.6581 +0260.0000 +000.0000 +000.0000 -0012.3419 -0012.3419

    But I don't know to write a code for that

    Copy characters from 4 to 13 of row 1

  2. #2
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: HELP with code for copy of some rows from Text file to Excel cells

    Hi,

    Welcome in Excel Forum.

    What would be the answer. Can you mention it?


    regards
    taps

  3. #3
    Registered User
    Join Date
    10-26-2012
    Location
    Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: HELP with code for copy of some rows from Text file to Excel cells

    Hi taps,

    I'm looking for solution of my problem
    I know the code for copying whole row form Text file to Excel cell but I don't know, the code for something special - copy characters 4-13 from row 1 ONLY (I'm not expert in Excel)

  4. #4
    Forum Contributor
    Join Date
    09-29-2011
    Location
    Kolkata, India
    MS-Off Ver
    Excel 2003/2007
    Posts
    182

    Re: HELP with code for copy of some rows from Text file to Excel cells

    Hi,

    You can use MID function.

    Syntax is:
    =Mid(text, starting number, number of characters to retrieve)

    Here, your code could be

    Please Login or Register  to view this content.
    Note: you can use cell address in place of "Your text"

    regards
    taps

  5. #5
    Registered User
    Join Date
    10-26-2012
    Location
    Slovakia
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: HELP with code for copy of some rows from Text file to Excel cells

    Ya, it works!!!!

    Thanks for your help Taps

    regards

  6. #6
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: HELP with code for copy of some rows from Text file to Excel cells

    @ atoppad

    Welcome to the forum.

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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