How To Use The CONCAT And CONCATENATE Functions ?



Occasionally, you will encounter a dataset with data values in separate cells that you want to combine as a single value in a single cell. This is common when dealing with names and dates. The dataset may have separate columns for first names and last names, but you may want a column with the full names. 

City/state and month/year combinations are also often desirable to have together, as they are likely to be recorded together. 

The CONCAT function in spreadsheets can combine these kinds of data.

Combining data from two cells

First, using the spreadsheet you downloaded, you’ll combine the two sets of names in columns First Name and Last Name in a new column called Full Name

To do this, follow these steps:

1. Click on cell F2. This is where you start the data for the new column. After you click on the cell, type =CONCAT(A2,B2) into the function bar and hit Enter (Windows) or Return (Mac).



Once you press enter, the following data should appear in the cell:


You have merged or, technically, concatenated the two data values from cells A2 and B2. Because you listed A2 first in the CONCAT function argument, it comes first in the final result.

Notice that the two names were combined without a space between them. 

If you want to put the space in between, you need to use the full CONCATENATE function, which allows you to combine multiple strings. 

2. Click again on the cell F2. In the function call, place a space in quotes between A2 and B2 separated by commas.


Once you press enter or return, your screen should appear like this:


Now there is a space between the first name and the last name.

Next, repeat this process for all the remaining cells in Column F. Of course, you don't want to do this manually for each cell. (Especially if the dataset were larger, it would be laborious to do this cell-by-cell.) Luckily, you can fill out the data in the column by using your mouse.

1. Click on the cell F2. Locate the small square in the lower-right corner of the highlighted boundary of the cell.

2. Click on this square, drag your mouse to the bottom of the column, and release. All the cells in the column should populate with the full name of the appropriate president. 



Comments

Most Popular