View Single Post
  #1   Report Post  
olasa
 
Posts: n/a
Default Etracting Text from a cell


This is one option:

ColB: =LEFT(A5,SEARCH(",",A5)-1)
ColC: =RIGHT(A5,LEN(A5)-SEARCH(",",A5))

This is the result:
ColA............ColB..........ColC....
Doe,John.....Doe..........John
[Blank]........#VALUE!...#VALUE!


To you want to avoid #VALUE! use this instead:
ColB:
=IF(ISERROR(LEFT(A5,SEARCH(",",A5)-1)),"",LEFT(A5,SEARCH(",",A5)-1))
ColC:
=IF(ISERROR(RIGHT(A5,LEN(A5)-SEARCH(",",A5))),"",RIGHT(A5,LEN(A5)-SEARCH(",",A5)))



Ola Sandström


--
olasa
------------------------------------------------------------------------
olasa's Profile: http://www.excelforum.com/member.php...o&userid=17760
View this thread: http://www.excelforum.com/showthread...hreadid=355962