+ Reply to Thread
Results 1 to 3 of 3

Text document edition and manipulation

  1. #1
    Registered User
    Join Date
    10-17-2012
    Location
    Essen, Germany
    MS-Off Ver
    Excel 2010
    Posts
    2

    Text document edition and manipulation

    Hi everyone,
    I am trying to write a Macro than can modify a text documents and edit it according to my requirement. For example i have a text document which contains lines:

    facet normal -6.930870e-001 -7.208539e-001 -0.000000e+000
    outer loop
    vertex 3.535534e+000 3.535534e+000 0.000000e+000
    vertex 3.394004e+000 3.671613e+000 5.000000e+000
    vertex 3.394004e+000 3.671613e+000 0.000000e+000
    end loop

    I would like to edit this text file select only the numerical values in the loop and make them comma separated. This text would look like
    3.535534e+000, 3.535534e+000, 0.000000e+000
    3.394004e+000, 3.671613e+000, 5.000000e+000
    3.394004e+000, 3.671613e+000, 0.000000e+000

    Also what would you do if you have n number of loops? I have read that the following manipulation has to be done using Strings. I shall be grateful if you could provide a Macro to this.

    Thanks.

  2. #2
    Forum Guru karedog's Avatar
    Join Date
    10-03-2014
    Location
    Indonesia
    MS-Off Ver
    2003
    Posts
    2,971

    Re: Text document edition and manipulation

    Hi,

    This code will change the data to desired format. It will also ask for the range where the macro should be performed, so you don't need to bother about loops.

    Please Login or Register  to view this content.
    Regards
    1. I care dog
    2. I am a loop maniac
    3. Forum rules link : Click here
    3.33. Don't forget to mark the thread as solved, this is important

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

    Re: Text document edition and manipulation

    Try this
    Please Login or Register  to view this content.

+ 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. Replies: 0
    Last Post: 09-04-2014, 03:32 AM
  2. Text Manipulation Help
    By bbroussard in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-03-2014, 02:04 PM
  3. Text Manipulation
    By jcy1011 in forum Excel General
    Replies: 4
    Last Post: 08-02-2010, 03:41 PM
  4. Text Manipulation
    By sanjimmy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-24-2007, 05:18 PM
  5. Replies: 2
    Last Post: 12-18-2005, 08:20 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