+ Reply to Thread
Results 1 to 5 of 5

Replace word in a sentence

  1. #1
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2003
    Posts
    5

    Replace word in a sentence

    Hello,

    I am a new member in the forum and I will need your help.

    I use the following code. I want to make Replace only in the case which there is a whole word in a part of a cell, but not in part of specific characters.

    Example: In the code i want to replace the word “to” but replaces all the words that contains “to”. For example in the word together lets only the characters gether, and in the word tonight lets only the characters night etc.

    Please Login or Register  to view this content.

    Thank you in advance,

    Regards,
    Dimitris

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Replace word in a sentence

    Try this......

    Please Login or Register  to view this content.
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Replace word in a sentence

    Change :- oNameFalse = "to" to oNameFalse = " to " and perhaps replace to :- " "

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Replace word in a sentence

    Did you try putting a space before and after the word "to"? Like this:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-14-2014
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Replace word in a sentence

    Hi,

    Thank you all for your help.

    Dimitris

+ 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. [SOLVED] Seeing if a sentence contains a certain word
    By ohaganli in forum Excel General
    Replies: 8
    Last Post: 10-17-2012, 08:27 AM
  2. [SOLVED] How can I replace a word from a sentence in a cell & substitute word from another cell
    By rionoah in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-11-2012, 08:44 AM
  3. [SOLVED] Search for a word from a sentence....
    By raghuprasad.999 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 08-26-2012, 10:54 PM
  4. How to find and replace a word in a sentence with VBA
    By Gunilla in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-20-2010, 09:52 PM
  5. cannot identify word in a sentence
    By dschmitt in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2010, 02:20 AM

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