1

So let's say this is column C.

Coker, Jared
Palmer, Drew
Bryant, Will

I want to pull just the first word from these cells to another cell in say column O.

How does one go about doing this?

5

The easiest way is to use a pattern-match feature called "regular expression matching":

=REGEXEXTRACT(C1, "[^,]*")

This means: Extract a sequence of not-comma characters.

Another possibility is to use the SPLIT() function, but it stores each of the split-out substrings (e.g. "Coker" and "Jared") in separate cells. If the string has more commas, SPLIT() will store into more cells.

Another possibility is to use SEARCH() or FIND() to find the first ,, combined with LEFT() to extract the left part of the string:

=LEFT(C1, FIND(",", C1) - 1)

but this will produce a #VALUE! error if the string doesn't contain a ,.

0

You can use char code as well, the below is example with space

=LEFT(A59, FIND(CHAR(160), A59) - 1)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.