Word select from a string
I wish to select a particular word from a string but cannot see a formula to do it. At the moment I am only interested in the first word so coded A1="FRED BLOGGS" =LEFT(A1,FIND(" ",A1)-1) which works fine as long as there is a " " in the string. However this is not always the case so the FIND function returns #VALUE! and messes up the the formatting. I'm sure there is an easier way of doing this so any help would be appreciated. Many thanks. -- bridgjr ------------------------------------------------------------------------ bridgjr's Profile: http://www.excelforum.com/member.php...o&userid=25908 View this thread: http://www.excelforum.com/showthread...hreadid=392844 |
Can you give an example. Or is this what you want. =IF(ISERR(FIND(" ",A1)),A1,LEFT(A1,FIND(" ",A1)-1)) Mangesh -- mangesh_yadav ------------------------------------------------------------------------ mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470 View this thread: http://www.excelforum.com/showthread...hreadid=392844 |
Thanks Mangesh, that does what I want. -- bridgjr ------------------------------------------------------------------------ bridgjr's Profile: http://www.excelforum.com/member.php...o&userid=25908 View this thread: http://www.excelforum.com/showthread...hreadid=392844 |
Well thats good. Thanks for the feedback. Mangesh -- mangesh_yadav ------------------------------------------------------------------------ mangesh_yadav's Profile: http://www.excelforum.com/member.php...o&userid=10470 View this thread: http://www.excelforum.com/showthread...hreadid=392844 |
All times are GMT +1. The time now is 02:05 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com