+ Reply to Thread
Results 1 to 4 of 4

Input Text File in Worksheet

  1. #1
    Registered User
    Join Date
    02-16-2007
    Posts
    5

    Input Text File in Worksheet

    I am new to VB. I have a requirement to import large amounts of data that exist in text files. I have put together a simple macro that imports all the data. I would rather be sellective in what I import.

    I have attached a sample file of the raw data. In this case I would like to omit any rows that start with 'C' and any ows that contain the data string 'QF 9762'.

    I have looked through other examples here but cannot find anything that helps me.

    Thanks in advance for any help.
    Attached Files Attached Files
    Last edited by pavlo; 06-30-2007 at 08:40 PM.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Your file didn't attach, but I would look at AutoFiltering the newly imported data and removing the offending rows.
    Selecting custom formula while recording a macro will give you the syntax.

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    It all depends on how you are importingh the text files

    This macro opens files
    then uses Autofilter to remove unwanted rows of data

    Please Login or Register  to view this content.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  4. #4
    Registered User
    Join Date
    02-16-2007
    Posts
    5
    Thanks, I will give it a try.

    PP

+ 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