Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: importing data fram a text file

  1. #1
    New Member
    Join Date
    Mar 2002
    Location
    Frustrated Headbanger
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have a rather large text file that is comma delimited. However, there are three line breaks per row of information that cause both the row headings and the records to spread over three rows and misalign. Any clue as to how to import he file and get rid of the "hard returns"?

  2. #2
    MrExcel MVP Anne Troy's Avatar
    Join Date
    Feb 2002
    Location
    Westwood NJ
    Posts
    2,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hmmm...sounds like it's time for SUPERWORD!

    Generally, you can find/replace in text files with Word. If you can post a sample of, say three records, so I can find a pattern, I can post the finds/replaces that would work in Word, then you can import. Just put something like {BREAK} at the end of each record so I know where they end.


    ~Anne Troy

  3. #3
    MrExcel MVP Damon Ostrander's Avatar
    Join Date
    Feb 2002
    Location
    Denver, Colorado USA
    Posts
    4,239
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi rsawning,

    The most efficient way to do this would be to read the data using VBA I/O rather than importing the file into Excel as a text file. To read a file using VBA I/O, check out the Open, Line Input #, EOF, and Close statements in the VBA helps. It really is not hard.
    Keep Excelling.

    Damon

    VBAexpert Excel Consulting
    LinkedIn Profile http://www.linkedin.com/pub/damon-ostrander/7/79/a93
    AllExperts Profile http://www.allexperts.com/ep/1059-30...-Ostrander.htm

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •