SOLVED

Help with an Excel formula with conditions based on a single text cell with multiple values

%3CLINGO-SUB%20id%3D%22lingo-sub-3365211%22%20slang%3D%22en-US%22%3EHelp%20with%20an%20Excel%20formula%20with%20conditions%20based%20on%20a%20single%20text%20cell%20with%20multiple%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3365211%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22StephenMorley_0-1652363784693.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F371173i719DB1B85EEE32A0%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22StephenMorley_0-1652363784693.png%22%20alt%3D%22StephenMorley_0-1652363784693.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EI%20have%20a%20column%20with%20multiple%20values%20possible%20in%20it.%26nbsp%3B%20I'm%20trying%20to%20extract%20the%20first%20word%20from%20each%20cell%20in%20the%20column.%26nbsp%3B%20As%20above%2C%20you%20can%20see%20I've%20got%20a%20formula%20for%20the%20condition%20if%20there%20are%20multiple%20words%20in%20the%20cell.%3CBR%20%2F%3EIn%20cell%20A2%2C%20you%20see%20there%20are%20no%20spaces%2C%20so%20the%20formula%20of%26nbsp%3B%3DLEFT(A2%2CFIND(%22%20%22%2CA2)-1)%20won't%20work.%3CBR%20%2F%3EWhat%20I%20would%20like%20is%20a%20formula%20that%20would%20capture%20both%20conditions%3A%3CBR%20%2F%3EIf%20there%20is%20one%20word%2C%20display%20that%20word%2C%20if%20a%20space%20is%20found%2C%20display%20the%20left-most%20word.%3CBR%20%2F%3E%3CBR%20%2F%3EAny%20help%20would%20be%20appreciated.%3CBR%20%2F%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3365211%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3365318%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20an%20Excel%20formula%20with%20conditions%20based%20on%20a%20single%20text%20cell%20with%20multiple%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3365318%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F83178%22%20target%3D%22_blank%22%3E%40Stephen%20Morley%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%3DIFERROR(LEFT(A2%2CFIND(%22%20%22%2CA2)-1)%2CA2)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EMaybe%20with%20IFERROR%20in%20addition%20to%20your%20formula.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3366016%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20an%20Excel%20formula%20with%20conditions%20based%20on%20a%20single%20text%20cell%20with%20multiple%20values%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3366016%22%20slang%3D%22en-US%22%3EThanks%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1174419%22%20target%3D%22_blank%22%3E%40Quadruple_Pawn%3C%2FA%3E%2C%20that's%20perfect%3C%2FLINGO-BODY%3E
Occasional Contributor

StephenMorley_0-1652363784693.png

I have a column with multiple values possible in it.  I'm trying to extract the first word from each cell in the column.  As above, you can see I've got a formula for the condition if there are multiple words in the cell.
In cell A2, you see there are no spaces, so the formula of =LEFT(A2,FIND(" ",A2)-1) won't work.
What I would like is a formula that would capture both conditions:
If there is one word, display that word, if a space is found, display the left-most word.

Any help would be appreciated.


2 Replies
best response confirmed by Stephen Morley (Occasional Contributor)
Solution

@Stephen Morley 

=IFERROR(LEFT(A2,FIND(" ",A2)-1),A2)

Maybe with IFERROR in addition to your formula.