View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Formula to pull first word from text string in a column

That prevents an error from being returned if the string doesn't contain a
space character. That may not apply in your situation but I thought I'd
suggest it for anyone that might be interested.

A1 = Jeep

=LEFT(A1,FIND(" ",A1)-1)

That formula will return an error because FIND can't find a space character
in the string. To prevent the error we append a space character: A1&" "

=LEFT(A1,FIND(" ",A1&" ")-1)

A1 = Chevy Camaro

=LEFT(A1,FIND(" ",A1&" ")-1)

That string does contain a space character and the space character that gets
appended is basically ignored because FIND will find the *first* space
character in the string.


--
Biff
Microsoft Excel MVP


"CrisT" wrote in message
...
May I ask, what does the '&" "' do? Thanks for your help too!

"T. Valko" wrote:

You may want to add some error handling


Another way:

=LEFT(A1,FIND(" ",A1&" ")-1)

--
Biff
Microsoft Excel MVP


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
=LEFT(A2,FIND(" ",A2)-1)

You may want to add some error handling if there isn't always more than
one word.
=IF(ISNUMBER(FIND(" ",A2)-1),LEFT(A2,FIND(" ",A2)-1),A2)
--
David Biddulph

"CrisT" wrote in message
...
Hello, I was hoping someone could help me with a formula. I have a
column in
a spreadsheet that has the following types of text (for example):

Subaru WRX
Subaru STI
Jeep Wrangler
Jeep Grand Cherokee

What I am looking for is a formula to pull the first word from the
column
and put it in another column, say column T.

Thank you in advance!