View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default extract word function

One way ..

Assuming space as text separators, with source data in A1 down

In B1:
=IF(ISERROR(LEFT(A1,SEARCH(" ",A1,SEARCH(" ",A1,SEARCH("
",A1)+1)+1)-1)),A1,LEFT(A1,SEARCH(" ",A1,SEARCH(" ",A1,SEARCH("
",A1)+1)+1)-1))
Copy down

If there's less than 3 words in the string, then the above simply returns
col A as-is
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Dinesh" wrote:
Is their a function to extract first 3 words from a text string?

Thanks.

Dinesh Shah