+ Reply to Thread
Results 1 to 3 of 3

Importing non-delimited text file into excel

  1. #1
    Registered User
    Join Date
    09-29-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    16

    Importing non-delimited text file into excel

    I've a specific requirement where in I need to import text file which is non-delimited and contents should be copied to Excel in different columns...

    Text file contents is as below.

    Need VBA code to copy this in Excel different columns like

    DAte and time should go to Column A
    Incident status before - should go to Column B
    and contents between - and new date start should go to Column C

    Expected Output.jpg
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    05-14-2012
    Location
    Unknown
    MS-Off Ver
    Unseen
    Posts
    429

    Re: Importing non-delimited text file into excel

    If you open the text file in Excel, you can use some Helper columns to isolate the date, priority and data. Unfortunately, you will probably need to use VBA to extract the data.

    First, insert a header row. Then set A1 to E1 to Text, Date, Time, Priority and Priority Text respectively

    Then:

    B2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    C2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    D2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    E2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Copy the formulae down to the end of the data.

    You can now filter on the priority column for "yes" to see the date, time and priority text.

    As for the data in between those rows, it is very, very variable. As I said, I think you will need VBA to collate the message content into a single cell. In principle, it shouldn't be too difficult - you know the rows with message headers and you can use something like ConcatAll to concatenate the data between those row.

  3. #3
    Registered User
    Join Date
    09-29-2015
    Location
    India
    MS-Off Ver
    2013
    Posts
    16

    Re: Importing non-delimited text file into excel

    VBA Code is the issue for me...I'm not too familiar with VBA code....if you can help in getting the VBA code for this issue, it would be of great help....

+ 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. Importing txt space delimited text file
    By huytran102 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-16-2014, 04:13 PM
  2. Importing Delimited Text File
    By JHCross in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2011, 06:01 PM
  3. Importing Delimited Text file
    By mmb.kala in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2010, 02:45 AM
  4. Importing Delimited Text/Exporting Delimited Text Loop
    By cecarter74 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-05-2009, 01:17 PM
  5. Importing space delimited text file
    By EDIEC in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2008, 03:44 PM
  6. Replies: 0
    Last Post: 08-22-2005, 08:05 AM
  7. [SOLVED] Importing MM:SS From Tab Delimited File and Charting
    By Bryan in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 01-22-2005, 11:06 AM
  8. Excel 2003 Importing large delimited text file
    By Ron in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-05-2005, 11:06 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