+ Reply to Thread
Results 1 to 2 of 2

Last line of multiple text files matching first column numbers only

  1. #1
    Registered User
    Join Date
    11-29-2012
    Location
    New zealand
    MS-Off Ver
    Excel 2003
    Posts
    1

    Question Last line of multiple text files matching first column numbers only

    Hi,
    I have a folder with multiple logon details for my company network. This is generated by a script at logon. Every time the script runs it creates a new line so I would need the last line of the text file.
    It looks like this,

    tuttd logged onto HCRPC23138, IP address 10.201. 33. 24 at 14:47:20 on 2012/06/28

    The first characters are the username, the test file is also called HCRPC23138. The spread sheet contains the name (HCRPC23138) in the first column. What I would like to do is get the test file based on the name in A:1 and the put the username in the next column. I am not very good at VBA. Well to put it plainly I suck at it. I have created powershell scripts to do the work however it is still quite a manual process copying and pasting the values from CSV’s

    I have checked Import Specific line from multiple text files however it doesn’t quite work. As it puts all the text file information in the spread sheet.

    Thanks,

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

    Re: Last line of multiple text files matching first column numbers only

    c_schoonraad,

    Welcome to the forum!
    Give this a try:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

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

  3. #3
    Registered User
    Join Date
    11-29-2012
    Location
    New zealand
    MS-Off Ver
    Excel 2003
    Posts
    1

    Thumbs up Re: Last line of multiple text files matching first column numbers only

    Thanks tigeravatar. You're a legend, man, you're a genius in my books!

    I've changed the code a tiny bit to suit my purposes. I've attached the code and will set the thread to solved.

    Please Login or Register  to view this content.
    Thanks again.

    Christiaan

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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