+ Reply to Thread
Results 1 to 5 of 5

Strip Excess Semi-Colon from Text File

  1. #1
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299

    Strip Excess Semi-Colon from Text File

    How can I use VBA to strip the excess semi-colons from the attached csv text file??
    Is this even possible?

    Thank you very much for your time and help
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Strip Excess Semi-Colon from Text File

    Hello erock24,

    The file uses the semi-colon as a field separator. Use Text to Columns to convert the file.
    • Select column "A" on the worksheet.
    • On the main menu select Data >Text to Columns...
    • Click the Delimited option button.
    • Click the Next> button.
    • Click the Semi-Colon check box for the delimiter.
    • Click the Next> button.
    • Click the Finish button.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299

    Re: Strip Excess Semi-Colon from Text File

    i know but I was hoping to remove the extra semi-Colons from the file before I did text to columns. Any ideas how to do that?

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Strip Excess Semi-Colon from Text File

    Hello erock24,

    If you remove the semi-colons from the text then what will you use as a delimiter for the fields?

    Anyway, you can use the Find/Replace dialog (Ctrl+F). On the Find tab enter a semi-colon and on the Replace tab enter "" (2 double quotes, no space) and click "Replace All".

  5. #5
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299

    Re: Strip Excess Semi-Colon from Text File

    thanks, the text to columns worked when I checked the box "Treat consecutive delimeters as one"

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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