+ Reply to Thread
Results 1 to 6 of 6

Data from a text file into excel

  1. #1
    Registered User
    Join Date
    01-29-2013
    Location
    VietNam
    MS-Off Ver
    Excel 2003
    Posts
    46

    Data from a text file into excel

    Problem: I have a HK1114.text file, I need to get the total value of 24 hours (data medium red frame) per day in each cell
    Please see the attached file
    Thank you
    Sorry I do not know much about English.Book1.xls
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,960

    Re: Data from a text file into excel

    Import the text file:
    On a new sheet:
    1. Data > From Text (delimited)
    2. next
    3. next
    4. finish
    5. select A1 for start cell
    6. select entire column A
    7. data, text to columns
    8. check semi-colon delimiter
    9. finish
    10. delete first six and last six rows of data
    11. The data you want to sum is in column J and the days are in column D, so use:
    Please Login or Register  to view this content.
    ($S1 has day of the month in the sample workbook)
    Attached Files Attached Files
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    01-29-2013
    Location
    VietNam
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Data from a text file into excel

    The standard
    Thank you very much
    But if I use vba code must write how?

  4. #4
    Registered User
    Join Date
    01-29-2013
    Location
    VietNam
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Data from a text file into excel

    Quote Originally Posted by protonLeah View Post
    Import the text file:
    On a new sheet:
    1. Data > From Text (delimited)
    2. next
    3. next
    4. finish
    5. select A1 for start cell
    6. select entire column A
    7. data, text to columns
    8. check semi-colon delimiter
    9. finish
    10. delete first six and last six rows of data
    11. The data you want to sum is in column J and the days are in column D, so use:
    Please Login or Register  to view this content.
    ($S1 has day of the month in the sample workbook)
    The standard
    Thank you very much
    But if I use vba code must write how?

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,960

    Re: Data from a text file into excel

    Here's a macro to import the text file, distribute text to columns and fill the summary table.
    You will have to modify the line in red for your path, etc.
    The macro is attached to a button and will import to the same sheet.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    01-29-2013
    Location
    VietNam
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Data from a text file into excel

    Thank you very much!

+ 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. Text file specific data to excel
    By farrukh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-07-2012, 02:30 AM
  2. How to get data from text file to excel
    By lakshmisanthi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-29-2012, 03:58 AM
  3. How to extract Information from an Excel File and entering those data in a text file?
    By bikash.nitk in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-10-2012, 12:13 PM
  4. Macro to collect data from a text file into an excel file
    By Calibri in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-01-2012, 11:47 PM
  5. Get Data From Text File And Convert To Excel File
    By nuriez1906 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-29-2012, 09:51 AM

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