The current data set has columns for both last name and first name. While this is optimal for sorting and analyzing data, it may occasionally be preferable to have the first and last names combined into a single column. The CONCATENATE function makes this task easy.
Copying the practice workbook
If you are beginning this course at this point, you will need to copy the practice workbook to your Google Drive.
- To begin copying the practice workbook in a new browser window,
Right-Click Copy practice workbook, Click Open link in new window
The file begins to open in a new window of the web browser. Before the document will open and can be edited, we need to make a copy of it.
Move to the new browser window.
- To copy the workbook file, in the browser window,
Click
A copy of the file is now open and, by default, is saved in your Google Drive. The filename now has the words "Copy of" at the beginning.
Entering the CONCATENATE function
The typical syntax for the CONCATENATE function is as follows:
=CONCATENATE(text1,text2,...)
Because there is a space between the first and last names, it will be necessary to include that space in the function. This can be done by adding a space surrounded by double quotes. In addition, we will use the cell references for the first name (C2) and last name (B2). Therefore the syntax for this exercise will be as follows:
=CONCATENATE(C2," ",B2)
Before completing the CONCATENATE function, let's add a new column to contain the full names of the employees.
- To select column D, in the header row,
Click
- To add a new column,
Right-Click column D, Click Insert 1 column left
- To add the column heading,
Click in cell D1, type: Full Name
- To accept this change, on the keyboard, press:
Enter key
With the new Full Name column in place, let's add the CONCATENATE function and insert the full names of the employees.
- To make cell D2 the active cell,
Click in cell D2
- To enter the CONCATENATE function, type:
=CONCATENATE(C2," ",B2) Enter key
An Autofill dialog box appears:
Google Sheets has automatically determined that the CONCATENATE function should continue down column D. The Autofill dialog box is asking us if we want to accept this suggested autofill. To accept it, we can either use the keyboard shortcut Control key + Enter key or we can click the checkmark button in the dialog box.
NOTE: If you do not see the Autofill dialog box, the Autocomplete feature may not be active in your version of Google Sheets. To turn this on, in the menu bar, Click Tools, Click Autocomplete, Click Enable autocomplete.
- To accept the suggested autofill and copy the CONCATENATE function down column D, on the keyboard, press:
Control key + Enter key
- To widen column D, in the column headers,
Double-Click
The employees' full names are now in column D.