Professional Documents
Culture Documents
(Excel) How To Extract Names
(Excel) How To Extract Names
Extracting First Names and Last Names without using Text to Columns
To those of you who have attended my Intermediate to Advanced Excel classes and wanted to find a better way of extra
have double Spanish surnames like Delos Santos or Delos Reyes or those that have too many first names like mine: there
without using the cumbersome text to columns feature in Excel. For advanced users, this also does away with WMID fu
FIND
First allow me to explain FIND. Determine the character that is the indicator for the separation between first name and
The syntax of FIND is =FIND(find_text, within text, [start number])
wherein find_text is the comma. This is typed into the formula as "," (Note that this includes comma enclosed in
and within_text is the full name. This is indicated by cell B4 (entry: Delos Santos, Jack Robert)
If we were to just use the function FIND, it will yield the following results
REPLACE
To extract the First Name, we will use the REPLACE function together with the FIND formula.
The syntax of REPLACE is =REPLACE(old_text,start_num,num_char, new_text)
Let's try extracting Jack Robert Delos Santos' first name in the table below.
With the REPLACE formula I am simply telling Excel that in the full name "Delos Santos, Jack Robert
convert it to space or " ". The equation will then leave me with " Jack Robert"
TRIM
Now eventhough this leaves me with Jack's first name, note that there is a space before his name. For data scrubbers, th
In order to eliminate the space, we shall use the TRIM function to encompass the REPLACE equation. TRIM simply delete
The syntax of TRIM is =TRIM(text)
So to combine REPLACE with TRIM, we are just going to encompass the entire REPLACE formula that we used earlier for
LEFT
So far, we’ve used FIND, REPLACE and TRIM to extract First Names from a full name. Now, how about for Last Names?
To extract the Last Name, we will use the LEFT function to display only characters to the left of the character you specifie
wherein text is the full name. This is indicated by cell B4 (entry: Delos Santos, Jack Robert)
and num_char is the number of characters to the left of the separator character you specified.
In this case, we shall use the FIND function to indicate the num_char parameter.
In the case of the table below, the FIND equation is stated as FIND(",",B87) which means that it needs to find the comm
However, you will note that I expanded the formula by using this instead FIND(",",B86)-1 This means that I need not
So in typing in the following LEFT equation: =LEFT(B88, FIND(",",B88)-1), I am therefore asking Excel to retain all ch
The names used in this spreadsheet are those of real people. At some point in time, we have all worked together and ha
Jack Robert Schaeffer Delos Santos is a Quality Manager at Rogers Telecommunications in Canada.
Booie Manalang is Senior Manager for Insight Analytics at Sykes Enterprises, Inc.
Rocky Sunico is Manager for Audit, Compliance and Product Training at VXI Global Solutions.
Neal Janvier Saveron is IT HR Scheduling Manager at Accenture.
This is meant to remember all QA teams through the years: QA Systems Group circa 2001-2004, Ambergris QA Team 2004 (esp. Chr
wanted to find a better way of extracting last names especially those of who
oo many first names like mine: there is now an easier way to extract them
, this also does away with WMID functions in MoreFunc.xla add-ins.
case the comma) within the full name text. This is case-sensitive.
ting what characters to extract and what it will be replaced with.
ou specified.
separation between first name and last name. In this case, that's the comma
os, Jack Robert" I need it to delete "Delos Santos, " and simply
ore his name. For data scrubbers, this becomes a data cleansing nightmare.
PLACE equation. TRIM simply deletes all spaces before and after a text.
u specified.
herefore asking Excel to retain all characters to the left of the comma without including the comma.
xcel and its many wonderful tricks, you are invited to attend our in-company classes. Or for my friends
y personal email address.
we have all worked together and have had many Excel discoveries:
04, Ambergris QA Team 2004 (esp. Chris & Loucelle), TQD/W, Team SCOPE and Project SCRUB.
HOW TO COMPARE TWO DIFFERENT LISTS
LIST ONE LIST TWO IS LIST ONE IN LIST TWO? IS LIST TWO IN LIST ONE?
Aquino, Benigno III Villar, Manny 0 1
Gordon, Richard Ejercito, Joseph 1 0
Villar, Manny Obama, Barack 1 1
Madrigal, Consuelo Gordon, Richard 0 1
Obama, Barack Teodoro, Gilbert 1 0