Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default return first TWO or THREE words in string

maybe i need put it better

compare..eg (and anything less or more)

Kennel name Molosser De Boeren
animal Name Queen of Sheba
thus name = Molosser De Boeren Queen of Sheba

v/s
Kennel name Aricon
animal Name Sweet Pea
thus name = Aricon Sweet Pea


"Rick Rothstein" wrote:

You were asked a couple of times about the "or possibly 3" part of your
question and you said you would work around it. That might not be necessary
assuming you asked the "wrong" question. Is your actual question "How do I
return all but the last word in an entry?" That is, is the text following
the part you want **always** a single word (containing no internal spaces)?
If so, you can use this formula to return the words in front of it...

=SUBSTITUTE(A1," "&TRIM(RIGHT(SUBSTITUTE(TRIM(A1)," ",REPT(" ",99)),99)),"")

If your newsreader breaks the above formula into two lines, the break will
have occurred at a blank space in the formula, so make sure you include it
when recombining the line.

--
Rick (MVP - Excel)


"EngelseBoer" wrote in message
...
similar to...
=LEFT(A1,SEARCH(" ",A1)-1)

but where the 1st 2 (or possibly 3) words are required to be returned
what do i need to change
or what script do i need here

A B
100 AKER BALTO 100 AKER
100 AKER BASTION 100 AKER
100 AKER BODECIA 100 AKER
DE WET SISQO DE WET
DE WET SKYE DE WET
DE WET STOFFEL DE WET
EL SHADAI LULU EL SHADAI
EL SHADAI MARMITE EL SHADAI
EL SHADAI MIMI EL SHADAI





Reply
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
find a string of nth occurance & pick next 3 words Eddy Stan Excel Worksheet Functions 7 June 3rd 08 08:44 PM
split string based on a SET of words [email protected] Excel Discussion (Misc queries) 8 August 3rd 07 03:09 AM
i need help creating a function that will extract words from a string of text [email protected] Excel Worksheet Functions 4 July 20th 07 10:51 PM
Extracting the last set of words from a text string IPerlovsky Excel Worksheet Functions 14 March 2nd 07 02:47 AM
How do I do a multiple search using key words in a text string patricia tipp Excel Discussion (Misc queries) 1 February 28th 06 05:01 PM


All times are GMT +1. The time now is 07:08 PM.

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"