+ Reply to Thread
Results 1 to 4 of 4

VBA to replace special characters with line break

  1. #1
    Registered User
    Join Date
    12-05-2013
    Location
    india
    MS-Off Ver
    Excel 2010
    Posts
    25

    Question VBA to replace special characters with line break

    hi friends,

    I am new to VBA excel scripting.. I need a script that fulfills the following conditions..

    I have an excel sheet which contains the data as the following


    """To:sara;
    cc: abi; pup; """
    """To: loe, frez;Str, Peo; lrson
    Cc: IT; GS; """
    "

    each cell in the first column contains the same data.. now I need the output as follows

    sara
    abi
    pup
    loe,frez
    str,Peo
    irson
    IT
    GC

    which means the characters ; : " should be replaced with line break.. and the names should be displayed in the second sheet or some other column one by one.. but in the same column..


    could u please help me to do this.. many thanks in advance
    Last edited by saranyabi; 12-06-2013 at 03:02 AM. Reason: to change the title as per moderator

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,105

    Re: i need a script for the following problem

    Hi, saranyabi,

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,105

    Re: VBA to replace special characters with line break

    Hi, saranyabi,

    could you attach a sample workbook to show how you data looks like as you talk about Column A having the same data but showing them here as maybe 2 lines? Or do you mean Address and CC being split into 2 rows and repeating?

    Ciao,
    Holger

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    20,162

    Re: VBA to replace special characters with line break


+ 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. Problem with Query / Script
    By Fionnan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-18-2011, 04:00 AM
  2. customUI script problem (XML)
    By dschmitt in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-11-2010, 09:23 AM
  3. VB Script Problem ?
    By khanjee in forum Excel General
    Replies: 3
    Last Post: 04-05-2008, 03:52 AM
  4. [SOLVED] Script problem - Help please
    By Les Stout in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-30-2005, 05:05 AM
  5. sub script out of range problem
    By AmyTaylor in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-26-2005, 08:05 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