How to Use LEFT to Extract Text Before Comma in Excel

Using the LEFT function in Excel can help you extract text before a comma in a given cell. The LEFT function returns the first specified number of characters from the left side of a text string. To extract text before a comma, you'll need to use a combination of the LEFT and FIND functions. The FIND function will help you locate the position of the comma in the text string.

Here's a step-by-step guide on how to use the LEFT function to extract text before a comma in Excel:

  1. Suppose you have a list of names in the format "Lastname, Firstname" in column A, and you want to extract only the last names.
  2. In an empty cell in column B (let's say B1), enter the following formula:
=LEFT(A1, FIND(",", A1) - 1)
  1. Press Enter to apply the formula. The last name should now appear in cell B1.
  2. To apply the formula to the rest of the cells in column B, click on the bottom right corner of cell B1 and drag it down to cover the entire range.

Here's an example:

Example

A B
Smith, John Smith
Johnson, Jane Johnson
Williams, William Williams
Brown, Emily Brown
Taylor, Elizabeth Taylor

In this example, column A contains names in the "Lastname, Firstname" format, and column B extracts the last names using the LEFT function combined with the FIND function, as explained above.

Did you find this useful?