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?
Web Applications Stack Exchange is a question and answer site for power users of web applications. It only takes a minute to sign up.
Sign up to join this communitySo 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?
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 ,
.
INDEX()
, support.google.com/docs/answer/3098242
– Jerry101
Oct 22 '16 at 23:16
You can use char code as well, the below is example with space
=LEFT(A59, FIND(CHAR(160), A59) - 1)