Parsing is the name for breaking something down into (its component) pieces.
In Excel, it’s fairly common to have a full name in a cell. How do you get out just the first name?†
You can do this with the functions =left() and =right(). These extract a certain number of characters from a string in a cell.
The problem is figuring out how many characters in a flexible way.
This tip from Tech Republic offers a cute trick – why not look for the spaces, and work from there?
Specifically, use =find() to return the number of characters until the first space.
So, if you have:
Barack Obama
In A1, you enter:
=LEFT(A1,FIND(" ",A1)-1)
In some other cell, it will return:
Barack
How did it do this? The function FIND(" ",A1), looked at A1, and found a space in the 7th character. Then =left() looked in A1, and took everything up the 7th character minus 1.
It’s a little more involved for other cases, but you can see the original post if you need help on those.
† Note that since the introduction of Excel 2007 there has been a "Text to Columns" feature that you should check out. It's not as flexible as this method, but it's pretty useful nonetheless.




