View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default Use FIND for / or \ or -

CLR wrote...
Playing off of RD's really nifty solution, this one will return a
blank if there is no occurance of \, /, or- in the cells

=IF(LEFT(A1,MIN(FIND({"/","\","-"},A1&"/\-"))-1)=A1,
"",LEFT(A1,MIN(FIND({"/","\","-"},A1&"/\-"))-1))

....

No need for multiple FIND calls.

=SUBSTITUTE(LEFT(A1,MIN(FIND({"/","\","-"},A1&"/\-"))-1),A1,"")