Create Summary and Report from text file

  • Hello,


    I recorded the macro to import large text file but unable to align it to cells, I need this macro to import text file on regular basis and create a summary of it.
    Please some one help with macro to import and create summary from it. The sample text and excel workbook is attached.
    Thanks in advance.


    Question posted in other forum link: http://windowssecrets.com/foru…t-File-and-Create-Summary

  • Re: Create Summary and Report from text file


    Output in Summary sheet

  • Re: Create Summary and Report from text file


    MODERATOR NOTICE: This topic has also been posted on other sites and may already have an answer elsewhere. Please take this into consideration when answering this question

    *

  • Re: Create Summary and Report from text file


    Hello,


    Cytop, I apologize & updated the first post.


    Jindon, Thanks for creation of summary, I am highly obliged. Please can i have the details of text file also in excel sheet for details cross check.
    The details are not getting formatted / aligned in cells with option Data-->From Text if i import.
    The Details Report is also required.


    Thanks in advance.

  • Re: Create Summary and Report from text file


    Quote from jindon;758302

    How do you want it?


    Thankyou Jindon for the response.


    I requested for details report, requirement is described in sheet1 of Test.xls.
    If possible please get the details report in sheet1 from text file along with summary in sheet2.
    Attached Test.xls.


    Thanks in advance.

  • Re: Create Summary and Report from text file


    See if this is how you wanted.

  • Re: Create Summary and Report from text file


    Hi,
    Sorry for delay reply.
    Thanks Jindon for the script.


    Jindon, on testing in summary suppose row of Location Total is empty then report gets corrupted. Please provide a solution.

    Quote


    |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
    | Location Total : No of Records : | | |
    |-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|


    Code
    .Cells(1).Value = "RUN DATE :" & Date


    This date to be appended from text file first line dd/mm/yyyy.


    Thanks in advance.

  • Re: Create Summary and Report from text file


    Run date issue.


    Upload a txt file, I only work with uploaded file.

  • Re: Create Summary and Report from text file


    Quote from jindon;758607


    Upload a txt file, I only work with uploaded file.


    Text file uploaded for testing i have made rows empty.


    Quote


    Location Code : 2 Area Remote 1
    Location Total : No of Records :


    Location Code : 400 Area Remote 3
    Location Total : No of Records :


    Code
    .Value = Application.Index(a, 0, 0)


    Runtime error '13:' Type mismatch.


    Please have a look.

  • Re: Create Summary and Report from text file


    Changeg "myReport" to

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!