+ Reply to Thread
Results 1 to 13 of 13

Insert two space after character

  1. #1
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Insert two space after character

    Hi,
    I was wondering is there a way so that the special characters and symbols will have double space after that, throughout the document.
    example:
    If there is :
    Mrs.Bell’s,

    It will be converted to :
    Mrs. Bell’ s,

    It will also be great if the code can be run on word and excel.Please guide me.

    thanks and regards,
    me

  2. #2
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Insert two space after character

    Use Find (') and replase (' ).

  3. #3
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: Insert two space after character

    Well, there are lot's of special character, as such it will be great if there is a code to do the entire work in one go .
    Thanks in advance.

  4. #4
    Forum Expert
    Join Date
    09-27-2011
    Location
    Poland
    MS-Off Ver
    Excel 2007
    Posts
    1,312

    Re: Insert two space after character

    try
    Please Login or Register  to view this content.
    Regards

    tom1977

    If You are satisfied with my solution click the small star icon on the left to say thanks.

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: Insert two space after character

    Select whole sheet and click CTRL+H
    Never use Merged Cells in Excel

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Insert two space after character

    why would you want to do this? and what counts as a special character? is there a list?
    you don't think you will get one code to work in both excel and word since the objects are different (documents vs workbooks etc)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  7. #7
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: Insert two space after character

    Hi,
    I just collated the characters after which I wanted the double space.Here is the list:
    ,
    .
    "

    :
    ;
    (
    )
    [
    ]
    {
    }
    /
    \
    |
    *
    !


    That's all, I think it will be great if I first run the code in the word and then copy it to excel for some documentation. As such please guide me how do I do it in word.
    Thanks in advance.
    Last edited by fatalcore; 05-28-2012 at 08:33 PM.

  8. #8
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Insert two space after character

    Try this macro on your Word document.

    Please Login or Register  to view this content.

  9. #9
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: Insert two space after character

    Waoo... That is absolutely brilliant,
    Just an update,
    can the code be modified to incorporate this logic.

    If there is 1 space after any special character, it will add a single space after that and If there is no space it will add double space.

    Thanks a ton for all your help.

  10. #10
    Forum Contributor
    Join Date
    01-20-2012
    Location
    Amsterdam, The Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    186

    Re: Insert two space after character

    You can always add two spaces after a specialchar and do another loop afterwards to replace a 3-space to a 2 space again.

    Please Login or Register  to view this content.

  11. #11
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Insert two space after character

    If you run Macro fist time it will add one space.If you run once again one more space will be added.

  12. #12
    Forum Contributor
    Join Date
    02-07-2011
    Location
    Bhutan
    MS-Off Ver
    Excel 2007
    Posts
    244

    Re: Insert two space after character

    Thank mate,
    That worked like wonders!
    Sir, can you suggest me a way so that I can do a batch processing on around 160 files in a folder?
    I was thinking like having a excel file with a button to call the location, and another button to process the files.
    Please guide.
    Thank

  13. #13
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Insert two space after character

    pl mark this thread SOLVED and start new thread for new problem.

+ 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