CONCATENATE in Excel – Shiksha Online

CONCATENATE in Excel – Shiksha Online

4 mins read759 Views Comment
Rashmi
Rashmi Karan
Manager - Content
Updated on Mar 3, 2023 13:00 IST

The article discusses the use of CONCATENATE in Excel to combine strings.

2022_06_Concatenate-in-excel-1.jpg

The CONCATENATE function in Excel allows us to join two or more text strings in the same cell. It is very useful in managing databases and gives a unique reference to the cells that identify each record. CONCATENATE is a function with a relatively simple implementation that supports matching up to 255 text strings.  

Content

Category: Text Functions

What is it for?: The CONCATENATE function combines two or more text strings to create a single text string.

Syntax:

=CONCATENATE(text1, [text2],…)

Where –

text1: This is a required argument. The element can be a text value, number, or cell reference.

text2: This is an optional argument. There can be a maximum of 253 text arguments for the text items. Each can be a string or an array of strings.

Must Explore – MS Excel Courses

Using CONCATENATE Function in Excel

CONCATENATE function in Excel to join texts and numbers. If we want to use the CONCATENATE function to join numbers and letters, we must consider that numbers do not need to be enclosed in quotes, but text values ​​do.

In the below example, we have different digits in different columns.

To combine them all, we will use the formula – 

=CONCATENATE(A1,B1,C1,D1,E1)

You can see that the strings have been joined into one.

Read MS Excel Tutorials

Most Popular and Powerful Formulas in Excel
Most Popular and Powerful Formulas in Excel
Excel has various functions ready to process your information to get the desired results. Familiarize yourself with each of them. Once you master various functions, you can create advanced MS...read more
How to Create MIS Report in Excel?
How to Create MIS Report in Excel?
A Management Information System (MIS) report in Excel is a vital tool for businesses and organizations, offering valuable insights by consolidating and presenting data in an organized and comprehensible format....read more
How to Merge Cells in Excel – Shiksha Online
How to Merge Cells in Excel – Shiksha Online
Learn how to merge cells in Excel through real datasets.
Recommended online courses

Best-suited MS Excel courses for you

Learn MS Excel with these high-rated online courses

β‚Ή5.5 K
18 hours
β‚Ή3.2 K
28 hours
β‚Ή1 L
6 months
β‚Ή59.54 K
10 months
β‚Ή4.3 K
2 months
– / –
45 hours
β‚Ή1.34 L
300 hours
– / –
1 month
β‚Ή6.4 K
104 hours

CONCATENATE in Excel with Spaces

We must replace the dashes in the above formula with spaces, keeping the quotes. Otherwise, Excel would interpret it as an error and remove the space.

For example, if we want to use the CONCATENATE function to say the following sentence: β€œI am 30 years old”.

So if you use the same formula that we used above, which is –

=CONCATENATE(A1,B1,C1,D1,E1)

The results would look something like this, which looks incorrect.

Here, we need to tweak our formula a little and add spaces. The formula we will use will be:

=CONCATENATE(A1, ” β€œ, B1,” β€œ, C1,” β€œ, D1,” β€œ, E1)

As you can see, we put two quotes and a space between the arguments so that the space exists in the result; otherwise, β€œI am 30 years old” would appear altogether.

Tutorial – XLOOKUP in Excel – Shiksha Online
Tutorial – XLOOKUP in Excel – Shiksha Online
The article talks about an advanced and flexible lookup function, XLOOKUP.
How To Enable Macros In Excel
How To Enable Macros In Excel
A macro is an action or a set of actions that you can run as many times as you want. When you create a macro, you are recording your mouse...read more
How to Import Text Files to Excel
How to Import Text Files to Excel
Managing massive volumes of data is tricky, especially when those are on your text files. Moving data to Excel for better calculations and presentations is an efficient way to handle...read more

CONCATENATE Function with Comma

The CONCATENATE function can help us in cases where the information is distributed in several columns, and we want to integrate the information into a single column. For example, I have some information spread across different columns. 

This is the case where we will consider a comma as an argument and include that in our formula.

I will start writing the CONCATENATE function, specifying my arguments:

=CONCATENATE(A1,” β€œ,B1,” β€œ,C1,” β€œ,D1,E1,” β€œ,F1,” β€œ,G1, H1,” β€œ, I1,” β€œ,J1, ” β€œ, K1),

Note that I have included a space after every cell number, and where the comma appears, no space is mentioned as we don’t want a space before the comma.

After we apply this formula, we get the result as follows.

It is important to note that the CONCATENATE function does not generate blanks between the strings, so we must put them.   

Freeze Panes in Excel – Shiksha Online
Freeze Panes in Excel – Shiksha Online
Discover the powerful feature of freeze panes in Excel that allows you to lock rows or columns, ensuring important information stays visible as you explore large datasets or create complex...read more
Microsoft Excel vs. Google Sheets: Shiksha Online
Microsoft Excel vs. Google Sheets: Shiksha Online
MS Excel and Google Sheets are the most widely used spreadsheet applications, offering similar data management, analysis, and visualization functionalities. While they share many common features, users should be aware...read more
Weighted Average in Excel – Shiksha Online
Weighted Average in Excel – Shiksha Online
This tutorial will teach you how to calculate a weighted average, also known as a weighted mean.

Adding Function to CONCATENATE Formula

We have a dataset of the employee names. If we apply the formula using spaces within the quotes, the characters will become a string, but double spaces will appear in cases where there is no middle name.

You can see that the empty cells appear as double spaces because of the space we entered in the formula. To avoid such problems, we would need to add logical functions to the formula so that Excel evaluates if there is an empty cell. If so, it does not include one of the spaces we are using, nesting the concatenate function with the if function.

We use the logical function IF. the formula would be –

=IF(B2=””,CONCATENATE(A2,” β€œ,C2),CONCATENATE(A2,” β€œ,B2,” β€œ,C2))

The formula used in the example evaluates if cell B2 is equal to empty and if so, it simply concatenates the first name (A2), with the first and second last names (A2) and (C2); in case it contains any data, cell B2 is included in the formula.

You can see that the logical function ignores the empty cell and calculates as per the condition given in the formula.

Points to Note 

  • CONCATENATE function is replaced with the CONCAT function in the latest versions of Excel. The earlier function is still retained for backward compatibility.  
  • If the arguments in the CONCAT function are invalid or incorrect, the function will return #VALUE!, which is an error

Top Trending Articles in MS Excel:

Most Useful Excel Formulas | Min Max Functions in Excel | Average Functions in Excel | Introduction to MS Excel | Financial Modelling in Excel | MS Excel interview questions | Sum Function in Excel | Trim Function in Excel | Pivot Table in Excel | Percentage in Excel | Vlookup in Excel | Median Function in Excel | Types of Charts in Excel | Count Function in Excel | MS Excel Vs. Google Sheet | Remove Duplicates in Excel | Create Graph in Excel

About the Author
author-image
Rashmi Karan
Manager - Content

Rashmi is a postgraduate in Biotechnology with a flair for research-oriented work and has an experience of over 13 years in content creation and social media handling. She has a diversified writing portfolio and aim... Read Full Bio