+ Reply to Thread
Results 1 to 5 of 5

Help please...modify Macro to specify text delimiter

  1. #1
    Registered User
    Join Date
    04-02-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2010
    Posts
    3

    Help please...modify Macro to specify text delimiter

    Hi folks,

    I'm using a Macro workbook that a previous employee created. When you run it, Excel brings up the 'open file' window, you select a text file, and then it imports that text file into Excel. The import works fine, but my problem is that the text file is separating into columns incorrectly. E.g. "John Smith 01/01/1900" becomes "Jo", "hn Smit" and "h 01/01/1900".

    Any suggestions for how I can change the Macro to specify how the text is delimitted?

    Thank you



    Please Login or Register  to view this content.
    Last edited by kr2584; 04-02-2015 at 08:24 PM. Reason: Added code tags

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Help please...modify Macro to specify text delimiter

    You need to change the delimiter in the setup of the querytable.

    Please take a few minutes to read the forum rules, and then edit your post to add CODE tags.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    04-02-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2010
    Posts
    3

    Re: Help please...modify Macro to specify text delimiter

    Thanks, code tags now added.

    I've done a search for changing delimiter in a querytable but can't find anything that seems to work. Please have you got any suggestions how I can do it?

  4. #4
    Registered User
    Join Date
    04-02-2015
    Location
    Brisbane, Australia
    MS-Off Ver
    2010
    Posts
    3

    Re: Help please...modify Macro to specify text delimiter

    Never mind - it took me several of hours of googling, but I cobbled this together, and it seems to work. Yay!

    Please Login or Register  to view this content.

  5. #5
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Help please...modify Macro to specify text delimiter

    If we could get a small sample of the text file to be able to see what it is exactly your working with would be a big help.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

+ 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: 4
    Last Post: 05-02-2013, 11:16 AM
  2. VBA macro for Inserting text file(having pipe as delimiter) into Excel sheet
    By Nusrat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2013, 05:40 AM
  3. Text to Rows Macro using Indentations as Delimiter
    By Meves in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-12-2012, 08:34 AM
  4. VBA Modify Text in Embeded Word Document through Excel Macro
    By amyhasquestions in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-26-2012, 02:15 PM
  5. [SOLVED] Macro to locate/modify text
    By Nate in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2006, 01:55 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