View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Removing *words from sentences

Have a look in HELP index for SUBSTITUTE

--
Don Guillett
SalesAid Software

"Runt" wrote in message
m...
If I have a field which contains sentences and some of the words in a
sentence has an asterix beside them, e.g.

"*Mary had *a little *Lamb"

...would it be possible to write a function that would produce a
sentence where the asterixed words are replace with a gap ("....."),
e.g.

"..... had ..... little ....."

If so, I'd really appreciate a pointer to how I might achieve this.

Thanks in advance for your time.

Chris


"Frank Kabel" wrote in message

...
Hi
there's no MatchAllWordForm feature in Excel. Regarding your other
question: yes it probably will

--
Regards
Frank Kabel
Frankfurt, Germany

"Runt" schrieb im Newsbeitrag
m...
Thanks for the reply, Frank. Isn't there a MatchAllWordForms feature
in Excel as in MS Word? Could this not be used to capture changing
tenses?

What about matching the first 3 or 4 letters of the word. Would this
capture the majority of cases where the tense was different?

Thanks again for help.

Chris


"Frank Kabel" wrote in message

...
Hi
don't think this is really possible in Excel. Esp. with changing

tense,
etc.

--
Regards
Frank Kabel
Frankfurt, Germany

"Runt" schrieb im Newsbeitrag
om...
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