+ Reply to Thread
Results 1 to 3 of 3

vba to Return Value from text line against value in other text line

  1. #1
    Registered User
    Join Date
    07-29-2010
    Location
    Multan
    MS-Off Ver
    Excel 2010
    Posts
    38

    vba to Return Value from text line against value in other text line

    Hi

    I have large number of text files from which i have to prepare an excel sheet having following detail
    1)Date
    2) time
    3) MWh

    Data in text file is logged as follows.

    Dates and time is sorted in format (yymmddhhmm) against each 0.1.2*(n)
    MWh are shown as 0000000.0 against each 1.8.0*(n)

    ( n starting from 01 to 15 )


    How do i write this data in Excel with vba as follows

    Date Time Mwh
    Date against 0.1.2*01 Time against 0.1.2*01 Mwh against 1.8.0*01
    Date against 0.1.2*02 Time against 0.1.2*02 Mwh against 1.8.0*02
    Date against 0.1.2*03 Time against 0.1.2*03 Mwh against 1.8.0*03
    .
    .
    .
    .
    .
    Date against 0.1.2*15 Time against 0.1.2*15 Mwh against 1.8.0*15

    Text file is attached. 41512040 .txt

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: vba to Return Value from text line against value in other text line

    hi joogibabu, option, please check attachment, press Run button or run code "test" and select folder with .txt files to process
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    07-29-2010
    Location
    Multan
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: vba to Return Value from text line against value in other text line

    Many thanks

    it works

    Regards

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Wanted: Highlight last line of text and copy to line below
    By King_Crud in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-17-2014, 08:01 AM
  2. [SOLVED] find non-blank cells and return line with only specific text
    By greg19 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-30-2014, 01:43 AM
  3. Read the text in a single cell line by line.
    By moon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-14-2010, 06:23 AM
  4. Replies: 8
    Last Post: 11-07-2008, 09:26 AM
  5. Replies: 6
    Last Post: 07-12-2005, 04:05 PM

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