Max wrote...
One way ..
Assuming data is in col A, A1 down
Try in say, B1:
=LEFT(TRIM(A1),SEARCH(" ",TRIM(A1),SEARCH(".",TRIM(A1))))
....
Could fail when there's more than one period in the text.
If the ending substring could be variable length but always preceded by
a space, it's possible to use
=LEFT(TRIM(A1),LOOKUP(2,1/(MID(TRIM(A1),ROW(INDIRECT("1:256")),1)=" "),
ROW(INDIRECT("1:256")))-1)
This relies on the functionality of the LOOKUP formula as it's worked
from Excel 97 through Excel 2003 (and probably in earlier versions as
well).
|