How to separate first and last names in Excel easily and without errors

Last update: 15/04/2025
Author Isaac
  • Excel offers several built-in tools for splitting full names into parts.
  • Formulas allow for greater customization than automatic methods like 'Text to Columns'.
  • Flash Fill is ideal for quick tasks, but requires consistent data.
  • WPS Office It is an effective alternative with functions similar to Excel.

Excel names and surnames

Working with spreadsheets may seem straightforward until you're faced with seemingly simple tasks that require specific techniques. One of the most common questions among Excel users is how to split a cell containing a full name into two columns: one for the first name and one for the last name. Although it may seem like a minor task, doing it incorrectly can lead to errors in databases, reports or analysis of information.

Luckily, Excel includes multiple methods to achieve this: from basic functions up to automatic tools such as 'Text in columns' o 'Quick fill' (Flash Fill). In this article we explain in detail each technique, its and advantages, disadvantages, and some additional tips that will help you work with personal data more efficiently.

Separate first and last names in Excel using "Text to Columns"

One of the most common ways to split full names into different columns is by using the tool Column text, a very useful feature found in the tab Facts & figures of Excel.

How is it done?

  1. Select the column containing the full names you want to split.
  2. Click on the tab "Data" on the top ribbon.
  3. Click on "Text in columns".
  4. In the wizard that opens, select the option “Delimited” and click "Following".
  5. Choose suitable delimiter, which will normally be a space if the names are written as "Carlos Pérez".
  6. Click on "Following" and then select the columns where you want the data to appear separated.
  7. Finish by clicking "Finalize".

Advantages

  • It is very easy to use, even for those with no experience with Excel.
  • You don't need to write formulas, everything is done graphically.
  • Allows you to separate several elements if there are more names or surnames using different delimiters.
  Disable USB Drives in Home windows 10

Disadvantages

  • Not ideal if there are irregular formats, such as compound names or multiple surnames.
  • Increase the number of columns, which can make organization difficult.
  • If you update the data originals, you will have to repeat the process manually.

Split names with Excel formulas

Excel separate columns

For those who need more control over their data, custom formulas They're a great option. Although they require a little more experience, they're very versatile and adapt to multiple situations.

Basic formulas for first and last name

  • To extract the name (assuming it is before the first space):
    =IZQUIERDA(A2, ENCONTRAR(" ", A2, 1) - 1)
  • To extract the surname:
    =DERECHA(A2, LARGO(A2) - ENCONTRAR(" ", A2, 1))

These functions work well when there are only a name and a surnameFor names with more spaces, such as "María del Carmen Rodríguez Pérez," more complex formulas would be required.

Advantages

  • Greater precision in cases of complex formats.
  • They update automatically if the original data changes.
  • Flexibility to adjust based on the patterns in your data.

Disadvantages

  • Requires basic knowledge of functions such as LEFT, RIGHT, LEN and FIND.
  • They can be difficult to maintain and expand on files with a lot of data or varied structures.
  • Errors in the logic of the formula may give incorrect results.

Automatic separation with Flash Fill

A very useful and little-known function is Flash Fill o fast fill. This tool detects patterns in what you enter and car completes the rest from the data based on what it “learns.”

How to use it?

  1. Create a new column next to the full names.
  2. Manually enter the first name separately (for example, just the first name).
  3. Start typing the second one and you will see that Excel suggests you complete automatically.
  4. press Enter and the rest of the values ​​will be filled in.

Advantages

  • Very fast and visual, ideal for specific tasks.
  • No formulas required nor prior knowledge.
  • Can adapt to names with various formats if the examples are well written.

Disadvantages

  • It works well only if the data follows a pattern. clear.
  • You can make mistakes if the names are very varied or poorly structured.
  • It does not update automatically if the original data changes.
  Easy Python examples for AI with scikit-learn, TensorFlow, and PyTorch

What if you don't use Microsoft Excel? Alternatives like WPS Office

For those who do not use Microsoft Office, a completely valid alternative is WPS OfficeThis free suite is compatible with Excel formats and has all the tools you need to split first and last names.

WPS Spreadsheet allows you to use both Column text , the formulas y Flash Fill with intuitive names and an interface similar to MS Excel.

Separate with Text in Columns

Just like in Excel, you can select cells with names, go to the tab "Data", Click on "Text in columns", define the delimiters and separate the values ​​into two different columns.

Using formulas in WPS

The formulas are practically the same:
=IZQUIERDA(A2, ENCONTRAR(" ", A2, 1) - 1) for the name and
=DERECHA(A2, LARGO(A2) - ENCONTRAR(" ", A2, 1)) for the surname.

Flash Fill is also available

You just have to write the pattern in a cell, select the next one and use the option fast fill from the tab Facts & figures. WPS will recognize the pattern and complete the rest automatically.

WPS also offers free templates, tools based on IA such as automatic writers, PDF wizards, Microsoft Office compatibility, and an interface that requires no learning curve.

What about names with multiple spaces or characters?

When the data is not well formatted, for example if it contains more spaces or punctuation marks such as commas or periods, basic functions may fail. In these cases:

  • use the function =SUSTITUIR to remove double spaces or strange characters before applying your formulas.
  • Use formulas like =EXTRAE together with BUSCAR o HALLAR to capture with Greater precision the components of the name.

What if the names are all in one cell separated by commas?

Sometimes you may come across a cell that groups several names separated by commas or other characters. In that case, use the tool Column text selecting coma as a delimiter. This will cause each name to be placed in a different column.

  Easy Ways to Hide Zeros in Excel

For more complex lists, you can combine functions like =EXTRAE, =HALLAR y =LARGO to extract each block separately.

What to do with middle names or compound names?

If you need to separate names that contain double middle or last names, you must use more advanced formulas. For example, you can use a combination of =EXTRAE y =HALLAR to obtain the second name by identifying the second space within the text.

Example for the middle name:
=EXTRAE(A2, BUSCAR(" ", A2) + 1, BUSCAR(" ", A2, BUSCAR(" ", A2) + 1) - BUSCAR(" ", A2) - 1)

Or you can also rely on Excel supplements like Ablebits, which allow you to separate full names into components such as First Name, Middle Name, Last Name, Suffix, etc.

There are many ways to separate first and last names in Excel, and the best one will depend on your data structure and ultimate goal. From automatic methods like Flash Fill to elaborate formulas for complex cases, each tool has its place. With a little practice, you'll be able to manage your databases in a more organized way, minimizing errors and buying time in your daily tasks.

How to Use the QUARTILE Function in Excel
Related article:
How to Use the QUARTILE Function in Excel – Complete Guide

Leave a comment