LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default removing words/phrase from sentences

I'm looking to create a column of sentences where the words/phrases
which appear in Column A have been removed from the sentences which
appear in Column B so if...

Cell A1 = "take sg over"
Cell B1 = "They plan on taking the company over."

....then I want to get...

Cell C1 = "They are planning to ...... the company ......"

Do you think it is possible to do this using either a MACRO or a
FUNCTION?. I'm currently using the following function for Cell C1...

=REPLACE(B1,SEARCH(LEFT(A1,4),B1), SEARCH("
",SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(B1,"."," "),"?"," "), "!","
"),SEARCH(LEFT(A1,4),B1)+LEN(A1))-SEARCH(LEFT(A1,4),B1),".....")

....but it gives...

Cell C1 = "They plan on ..... over."

....which is obviously inadequate.

Any ideas? Your help would be greatly appreciated.

Chris
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Split several sentences in one cell Therese Excel Discussion (Misc queries) 2 April 3rd 07 09:38 PM
Split sentences into words sparx Excel Discussion (Misc queries) 5 February 22nd 06 07:51 PM
removing a space between words in a cell JenBasch Excel Worksheet Functions 3 September 20th 05 12:39 AM
I need to put 4-5 sentences into one cell. tysonfoggie Excel Worksheet Functions 2 May 18th 05 02:52 PM
Removing rows featuring certain words clane Excel Programming 3 July 16th 04 03:12 PM


All times are GMT +1. The time now is 10:01 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"