Extracting surnames from Excel sheets efficiently is a common challenge for many office workers who need to process large amounts of data. PHP editor Baicao will introduce to you how to easily extract surnames using common functions in Excel. This article will explain in detail how to use the LEFT, MID and RIGHT functions and guide you step by step to complete the operation, allowing you to easily handle surname-related work and improve office efficiency.
1. In China, surnames always come before the given name, and most of the surnames are one Chinese character. There are fewer compound surnames (such as Shangguan, Ouyang, etc.). The surnames in our data table this time are all non-complex surnames. We will explain in detail how to extract compound and non-complex surnames later.
2. For data with names, it is very simple to get his last name. The first character on the left is. You only need to tell the computer to cut out the first character of the name field and place it in the last name field.
The interception string function LEFT has this ability.
2. Use LEFT to extract the last name
First we understand the LEFT function.
LEFT(text,[num_chars]) The function has two parameters. text is the data to be intercepted. In the function [[]] indicates optional parameters, which means that this parameter can be entered or If not entered, one character will be intercepted by default.
That is, LEFT (text) is equivalent to left (text,1).
In this example, our text is the name of a certain person. First, we enter [=LEFT(]
in the cell and then click the mouse to select the cell of the name. Since only one character is taken, we do not fill in the second parameter, but you can also fill it in. [,1]
After a function ends, you need to add [)]
Then comes the filling. Place the mouse in the lower right corner of the cell, double-click the filling, and then All surnames were taken out.
The above is the detailed content of How to extract surnames using common functions in excel_How to extract surnames using common functions in excel. For more information, please follow other related articles on the PHP Chinese website!