View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default Extract specific text

"Rick Rothstein (MVP - VB)" wrote...
....
Here is a slightly shorter formula . . .

....
=MID(A1,2+FIND(", ",A1),FIND(" ",A1,2+FIND(", ",A1))-2
-FIND(", ",A1))&MID(A1,FIND(" ",A1,1+FIND(" ",A1)),FIND(", ",A1)
-FIND(" ",A1,1+FIND(" ",A1)))


It won't be shorter when you wrap each A1 reference inside TRIM. Safer to
use TRIM(A1) than just A1.