Extract first two words of a cell

projectile

Board Regular
Joined
Dec 14, 2007
Messages
193
Hi

I need to extract the first two words from a cell. e.g.

A1---------------A2 (extract)

Mr Bill Gates------Mr Bill

I have tried =IF(ISERR(FIND(" ",A1)),A1,LEFT(A1,FIND(" ",A1)-1)) , however this only extracts first word.


The words are separated by spaces " "


FYG, Once I have this cracked then I can compare data from two names databases using =ISNUMBER(MATCH(A2,ARRAYCOLUMN,0))


Thanks
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
oops - forgot to remove 1 for the space

=LEFT(C77,(FIND("|",SUBSTITUTE(C77," ","|",2)))-1)
 
Upvote 0
Hi Thanks for you quick response.

I didn't explain that some field may contain just 2 words. It works for cells that contain 3+ words, but not for cells that contain less. Is there anything that can be done about that?
 
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,317
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top