Sean15
Well-known Member
- Joined
- Jun 25, 2005
- Messages
- 719
- Office Version
- 2010
- Platform
- Windows
I want to extract text before a comma, or space or if condition 1 or 2 is not met return text in cell:
Example:
James, John
Jones Tom
Lily
Expected result:
James
Jones
Lily
=LEFT(A1,(FIND(" ",A1,1)-1)) extracts text before space
=LEFT(A1,(FIND(", ",A1,1)-1)) extracts text before comma
I’m not sure what formula returns Lily
Could you help me combine formulas to get the THREE expected results?
Thank you for your help.
Regards,
Sean
Example:
James, John
Jones Tom
Lily
Expected result:
James
Jones
Lily
=LEFT(A1,(FIND(" ",A1,1)-1)) extracts text before space
=LEFT(A1,(FIND(", ",A1,1)-1)) extracts text before comma
I’m not sure what formula returns Lily
Could you help me combine formulas to get the THREE expected results?
Thank you for your help.
Regards,
Sean
Last edited: