+ Reply to Thread
Results 1 to 4 of 4

macro to split data in text file

  1. #1
    Forum Contributor geliedee's Avatar
    Join Date
    10-14-2013
    Location
    Manila, philippines
    MS-Off Ver
    Excel 2007
    Posts
    399

    macro to split data in text file

    Hi All,

    Can anyone help me on this problem?
    I have 100k++ data which is in text file. But I need to separate them and formula is not doing any good as the number lengths are not the same.
    the key identifier is the | that separates the number.

    Hope someone can help me.

    sample:
    Attached Files Attached Files

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: macro to split data in text file

    Hi geliedee,

    On the Data Tab there is an Icon called "Text to Columns" that was meant for this type of problem Select column A, click on Data > Text to Columns and make the character to split by a "|". Problem done.
    https://www.excel-easy.com/examples/...o-columns.html
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,523

    Re: macro to split data in text file

    How are you opening the file?

    [Data] - [Text file] and follow the instruction for importing.

    Should do easily and you can also manage the data types etc.

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: macro to split data in text file

    Quote Originally Posted by geliedee View Post
    Hope someone can help me.
    Hi !

    Attach at least a source text file sample or use the easy Text Import Wizard (Data, Import from file) …

    Easy VBA way via Workbooks.Open method (like OpenText as well), just reading the VBA help.
    Last edited by Marc L; 03-23-2020 at 11:55 PM.

+ 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. Split Text File Data
    By goropd in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-20-2018, 10:56 PM
  2. Need Macro code to split data split in 7 sheets based on variable rows in column A
    By Alija_21 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-31-2015, 08:03 AM
  3. Need Macro file to split then consolidate workbooks based on partial file name
    By dawnmau in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-04-2014, 04:37 PM
  4. Import text file and split data into specific sheets with Applet names
    By swethachepur in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-22-2014, 09:07 AM
  5. Need macro to split data(text and Number)
    By gujjuraja in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-29-2013, 05:55 PM
  6. Import text file into excel and split data in specific sheets
    By chirilaionut in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 06-03-2013, 07:04 AM
  7. Macro to copy a column data to flat file or text file
    By vinaynagasani in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-01-2009, 10:56 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