+ Reply to Thread
Results 1 to 5 of 5

Find and replace word at the end of sentence in cells

  1. #1
    Registered User
    Join Date
    02-06-2015
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    34

    Find and replace word at the end of sentence in cells

    I have many cells that contains words "created by [empty space]" .
    How to find such cells and delete only word "by" in case that there is nothing after "by".

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Find and replace word at the end of sentence in cells

    There's plenty of ways to do this. Can you post a sample workbook so we can manipulate your data?
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Registered User
    Join Date
    02-06-2015
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    34

    Re: Find and replace word at the end of sentence in cells

    I have one column with the following pattern. How can I find rows which contains word "by [empty space]". And remove or replace word "by" in these rows.

    This item created by first person
    Second item created by another person
    This Item created by
    Another item created by three persons
    Item created by
    These items created by fourth person

  4. #4
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Find and replace word at the end of sentence in cells

    in a new column

    =IF(RIGHT(A1,3)="by ",LEFT(A1,LEN(A1)-3),A1)
    and copy down
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Find and replace word at the end of sentence in cells

    With your text in A1:

    Try:

    =SUBSTITUTE(TRIM(A1)&REPT(" ",100),"by"&REPT(" ",100),"")
    Quang PT

+ 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. [SOLVED] Find and Replace Exact Word in Sentence.
    By rr1050 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-03-2014, 01:58 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

Tags for this Thread

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