Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Pat
 
Posts: n/a
Default return left most part of cell

anyone know if there is a formula that can return the first word of a string

example: 1

Abelia grandiflora 'Sherwoodii'

return - Abelia

example: 2

Abies balsamea

return - Abies

example: 3

Abutilon

return - Abutilon


what is needed is one formula that will cover all string possibilities

Thnkyou if you can help.


  #2   Report Post  
David Hepner
 
Posts: n/a
Default

Try this:

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

"Pat" wrote:

anyone know if there is a formula that can return the first word of a string

example: 1

Abelia grandiflora 'Sherwoodii'

return - Abelia

example: 2

Abies balsamea

return - Abies

example: 3

Abutilon

return - Abutilon


what is needed is one formula that will cover all string possibilities

Thnkyou if you can help.



  #3   Report Post  
Pat
 
Posts: n/a
Default

Thanks David, it works for example 1 & 2

#VALUE! is returned for 3


"David Hepner" wrote in message
...
Try this:

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

"Pat" wrote:

anyone know if there is a formula that can return the first word of a

string

example: 1

Abelia grandiflora 'Sherwoodii'

return - Abelia

example: 2

Abies balsamea

return - Abies

example: 3

Abutilon

return - Abutilon


what is needed is one formula that will cover all string possibilities

Thnkyou if you can help.





  #4   Report Post  
Richard Buttrey
 
Posts: n/a
Default

On Fri, 9 Sep 2005 13:54:29 +0100, "Pat"
wrote:

Thanks David, it works for example 1 & 2

#VALUE! is returned for 3



Try modifying David's suggestion to:

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


Rgds



__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
  #5   Report Post  
David Hepner
 
Posts: n/a
Default

Sorry, I didn't test all three. This should work.

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

"Pat" wrote:

Thanks David, it works for example 1 & 2

#VALUE! is returned for 3


"David Hepner" wrote in message
...
Try this:

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

"Pat" wrote:

anyone know if there is a formula that can return the first word of a

string

example: 1

Abelia grandiflora 'Sherwoodii'

return - Abelia

example: 2

Abies balsamea

return - Abies

example: 3

Abutilon

return - Abutilon


what is needed is one formula that will cover all string possibilities

Thnkyou if you can help.








  #6   Report Post  
Ron Rosenfeld
 
Posts: n/a
Default

On Fri, 9 Sep 2005 13:36:37 +0100, "Pat" wrote:

anyone know if there is a formula that can return the first word of a string

example: 1

Abelia grandiflora 'Sherwoodii'

return - Abelia

example: 2

Abies balsamea

return - Abies

example: 3

Abutilon

return - Abutilon


what is needed is one formula that will cover all string possibilities

Thnkyou if you can help.



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

(will also work on the last example)


--ron
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
How to return a dollar value for a part number entered in a cell free2bjmg Excel Worksheet Functions 3 July 24th 05 01:26 AM
I need help with an "If" Statement Whayne Excel Worksheet Functions 3 July 20th 05 09:25 PM
Replace part of link address in a cell with a value(date) from ano Hakan Excel Discussion (Misc queries) 0 July 20th 05 12:39 PM
Syntax for inferred cell references donesquire Excel Worksheet Functions 4 April 4th 05 09:29 PM
Formula to return cell contents based on multiple conditions Bill Excel Worksheet Functions 3 January 19th 05 09:59 AM


All times are GMT +1. The time now is 11:28 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"