Joins two or more strings into one string
The CONCATENATE Function[1] is categorized under Excel Text Functions. The function helps to join two or more strings into one string.
As a financial analyst, we often deal with data when doing financial analysis. The data is not always structured for analysis and we often need to combine data from one or more cells into one cell or split data from one cell into different cells. The CONCATENATE function helps us to do that.
For example, If I get a list of projects in this format:
The CONCATENATE function helps structure data in the following format:
=CONCATENATE(text1, [text2], …)
The CONCATENATE function uses the following arguments:
To understand the uses of this function, let’s consider a few examples:
Suppose you wish to make your data easy to comprehend for users. This function helps to do that.
Using the monthly sales data below:
We can use the formula:
To get the following result:
This result is unacceptable as it is difficult to read. For this, we need to add spaces. We would add a space (” “) in between the combined values so that the result displays “Revenue for North zone is 10mn.” The formula to use is:
We get the following result:
While analyzing and presenting data, we may often need to join values in a way that includes commas, spaces, various punctuation marks, or other characters such as a hyphen or slash. To do this, all we need to do is include the character we want in our concatenation formula, but we need to enclose that character in quotation marks. A few examples are shown below:
Sometimes our data needs to be separated by a line break instead of spaces or a character as shown in the previous examples. The most common example is merging mailing addresses imported from a .csv file or PDF file.
While doing so, we cannot simply type a line break in the formula like a regular character, and therefore a special CHAR function is needed to supply the corresponding ASCII code to the concatenation formula.
Hence, in Windows, we use CHAR(10) where 10 is the ASCII code for line feed. On the Mac system, we use CHAR(13) where 13 is the ASCII code for a carriage return.
In the screenshot below, we place the address information in columns A through D, and we are putting them together in column E by using the concatenation operator “&”. The merged values are separated with a comma (“, “), space (” “) and a line break CHAR(10):
The formula used was:
To get the result, as shown above, we need to enable the “Wrap text” option for the results to display properly. To do this, use Ctrl + 1 to open the Format Cells dialog. Switch to the Alignment tab and check the Wrap text box or go to Home tab and under Alignment click on Wrap text.
When combining values from multiple cells, we must make some effort, as this function does not accept arrays and requires a single cell reference in each argument.
So we need to use formula =CONCATENATE(B1, B2, B3, B4) or =B1 & B2 & B3 & B4.
Let’s see how to do this quickly using the TRANSPOSE function. Suppose there are 78 cells that need to be concatenated. In such a scenario, we need to:
The result would be:
Click here to download the sample Excel file
Thanks for reading CFI’s guide to important Excel functions! By taking the time to learn and master these functions, you’ll significantly speed up your financial analysis. To learn more, check out these additional CFI resources:
To master the art of Excel, check out CFI’s Excel Crash Course, which teaches you how to become an Excel power user. Learn the most important formulas, functions, and shortcuts to become confident in your financial analysis.
Launch CFI’s Excel Crash Course now to take your career to the next level and move up the ladder!