+ Reply to Thread
Results 1 to 8 of 8

Export specific data from text tile to excel - Possible?

  1. #1
    Registered User
    Join Date
    06-25-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    22

    Export specific data from text tile to excel - Possible?

    Hi all -

    I've created a macro that grabs an entire text file and imports it into excel. What I am wondering and what would be more efficient for me is if I could create a macro that just pulls specific information based on certain criteria and imports that into specific cells in my workbook. Is this possible?

    Thanks!
    Smithers

  2. #2
    Registered User
    Join Date
    06-25-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Export specific data from text tile to excel - Possible?

    text file*

  3. #3
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Export specific data from text tile to excel - Possible?

    Smith3rs,

    Your qualifying information is extraordinarily vague. So to answer your question "Is this possible?" Yes.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    06-25-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Export specific data from text tile to excel - Possible?

    I have text files that have 40k lines of data and I only need certain data from about 10 lines. I want to be able to go into these text files and be able to grab these specific data points without having to import the whole file into a worksheet. Is that more clear? I apologize if it is not, what can I say to be more clear?

  5. #5
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Export specific data from text tile to excel - Possible?

    Well, you'll probably need to use VBA in order to make this happen. The code can "read" a text file and output only what you tell it to (the desired data). So how would Excel know what specific data points you want?

    Ideally, please upload a sample text file (or two) and an Excel sheet showing the desired results. If possible, please also include step-by-step instructions for how you would do this manually.

  6. #6
    Registered User
    Join Date
    06-25-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Export specific data from text tile to excel - Possible?

    Hey tigeravatar -

    I really appreciate your patience, thank you. Here is a sample of the text file and what I need is for the "TOTAL:" amount under the "TV DIGITS" to be imported into Cell A1 if a blank worksheet. That is the only information I need to grab. Any help would be greatly appreciated.
    Attached Files Attached Files

  7. #7
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Export specific data from text tile to excel - Possible?

    Smith3rs,

    When you run this code it will prompt you to select a folder. It will then go through each text file in that folder and look for the word "TOTAL:"
    Every time it finds that word, it will collect the number immediately to the right.
    After collecting all of those numbers, it will output the results starting in cell A1 of the current sheet.
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    06-25-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010
    Posts
    22

    Re: Export specific data from text tile to excel - Possible?

    Wow you are the man/woman. Thanks!

+ 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