+ Reply to Thread
Results 1 to 4 of 4

Find and Replace Exact Word in Sentence.

  1. #1
    Forum Contributor
    Join Date
    12-27-2008
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    235

    Lightbulb Find and Replace Exact Word in Sentence.

    Hello Friends,

    Weekend starts,you may find time to solve thread.

    Attach File

    L Column Find word
    M Column Replace Word
    N Sentence

    My requirement looping for replace the word in N column. That means, by refering the L &/OR M last rows replace word in sentence by looping ie. L2 ....M2 to last row. Replacemet should if whole word match found then only. example Home replace with House; but if word Homealone then no changes.

    Yellow shaded will be result (in attach file).

    Have a nice weekend...
    Thanks Regards, RL
    Attached Files Attached Files

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Find and Replace Exact Word in Sentence.

    Hi,

    Try the following UDF

    In O2 enter

    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Find and Replace Exact Word in Sentence.

    Try:
    Please Login or Register  to view this content.
    Permissible trailing character after the search string (e.g. space, full stop) are defined in the s array. So if, for example, you DO want to replace "home," with "house,", then change that line to:
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  4. #4
    Forum Contributor
    Join Date
    12-27-2008
    Location
    India
    MS-Off Ver
    Office 365
    Posts
    235

    Re: Find and Replace Exact Word in Sentence.

    Both methods given exact result which requires my thread (question).

    Many thanks

    Thanks your valuable time.

+ 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. Find and replace a new sentence or paragraph in word doc
    By krazyhype19 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-03-2014, 06:06 AM
  2. to find a word in a sentence in acell
    By erickmcburger in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-23-2014, 08:37 AM
  3. Replace word in a sentence
    By dmarop in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-14-2014, 02:50 PM
  4. Find word in sentence
    By WCE_123 in forum Excel General
    Replies: 2
    Last Post: 09-21-2011, 06:59 AM
  5. 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

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