Skip to content
Free Excel Tutorials
  • Home
  • Excel For Beginners
  • Excel Intermediate
  • Advanced Excel For Experts

Data Analysis

  • How To Create Pareto Chart in Excel
  • Randomize/ Shuffle List in Excel
  • Conditional Formatting Data bars Examples in Excel
  • How To Filter Data in Excel
  • How to Use Solver Tool in Excel

References

  • INDEX function: Description, Usage, Syntax, Examples and Explanation
  • Left Lookup in Excel
  • How to get first column number in range in Excel
  • How to use Excel ROWS Function
  • LOOKUP function: Description, Usage, Syntax, Examples and Explanation

Data Validations

  • Excel Data validation no punctuation
  • Excel Data validation allow weekday only
  • Excel Data validation must not contain
  • Excel Data validation specific characters only
  • Excel Data validation with conditional list

Get last name from name with comma — Manipulating NAMES in Excel

by

If you need extract the last name from a full name in LAST, FIRST format, you can do so with a formula that uses the LEFT and FIND functions. The formula works with names in this format, where a comma and space separate the last name from the first name.

Note: this formula will only work with names in Last, First format, separated with a comma and space.

Worked Example:   Manipulating text strings using Left, Mid, Right, Len, Substitute in Excel

Formula

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

Explanation

LAST, FIRST
Philip, White
Tom, Green
Chalk, Black

In the example, the active cell contains this formula:

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

How this formula works

At a high level, this formula uses LEFT to extract characters from the left side of the name. To figure out the number of characters that need to be extracted to get the last name, the formula uses the FIND function to locate the position of “, ” in the name:

FIND(", ",B4) // position of comma

The comma is actually one character beyond the end of the last name, so, to get the true length of the last name, 1 must be subtracted:

FIND(", ",B4)-1 // length of the last name

Because the name is in reverse order (LAST, FIRST), the LEFT function can simply extract the last name directly from the left.

Worked Example:   Excel Data validation no punctuation

For the example, the name is “Chang, Amy”, the position of the comma is 6. So the formula simplifies to this:

Worked Example:   How to Separate Text Strings in Excel

6 – 1 = 5 // length of last name

Then:

LEFT("Chang, Amy",5) // "Chang"

Post navigation

Previous Post:

Extract last name from full name — Manipulating NAMES in Excel

Next Post:

Extract middle name from full name — Manipulating NAMES in Excel

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Learn Basic Excel

Ribbon
Workbook
Worksheets
Format Cells
Find & Select
Sort & Filter
Templates
Print
Share
Protect
Keyboard Shortcuts

Categories

  • Charts
  • Data Analysis
  • Data Validation
  • Excel Functions
    • Cube Functions
    • Database Functions
    • Date and Time Functions
    • Engineering Functions
    • Financial Functions
    • Information Functions
    • Logical Functions
    • Lookup and Reference Functions
    • Math and Trig Functions
    • Statistical Functions
    • Text Functions
    • Web Functions
  • Excel VBA
  • Excel Video Tutorials
  • Formatting
  • Grouping
  • Others

Logical Functions

  • IF function: Description, Usage, Syntax, Examples and Explanation
  • How to use Excel XOR Function
  • IF with boolean logic in Excel
  • How to return blank in place of #DIV/0! error in Excel
  • XOR function: Description, Usage, Syntax, Examples and Explanation

Date Time

  • Next biweekly payday from date in Excel
  • DAYS360 function: Description, Usage, Syntax, Examples and Explanation
  • Custom weekday abbreviation in Excel
  • List holidays between two dates in Excel
  • How to calculate months between dates in Excel

Grouping

  • Categorize text with keywords in Excel
  • Map text to numbers in Excel
  • Running count group by n size in Excel
  • Group numbers with VLOOKUP in Excel
  • Group arbitrary text values in Excel

General

  • How to generate random times at specific intervals in Excel
  • Basic numeric sort formula in Excel
  • How to generate random number weighted probability in Excel
  • Convert column letter to number in Excel
  • Count cells that do not contain errors in Excel
© 2023 xlsoffice . All Right Reserved. | Teal Smiles | Abbreviations And Their Meaning