In this article, we have shown 5 methods of how to combine two cells in Excel with a dash.
Let’s consider a scenario where a car dealer gives its cars code with this format: Car Model-Year. To illustrate our methods we have taken a dataset consisting of Car Model, Year, and Car Code as headers. Before jumping into the guide, remember you can download our Excel file to follow along.
How to Combine Two Cells in Excel with a Dash: 5 Easy Ways
1. Using Ampersand Symbol to Combine Two Cells in Excel with a Dash
We can use the Ampersand symbol (&) for joining two cells.
Steps:
- Select cell D5.
- Type the following formula-
=B5&"-"&C5
We are joining cells B5 and C5 with a dash (“-”) by using the Ampersand symbol.
- Press ENTER.
Here, the value of two cells is combined with a dash.
- Now move the cursor at the right-bottom corner of the cell to bring up the Fill Handle (+) icon.
- Drag down to AutoFill the cells with our formula.
Finally, the table should look like this.
Read More: How to Combine Cells into One with Line Break in Excel
2. Utilizing the CONCAT Function to Combine Two Cells in Excel with a Dash
Microsoft has introduced the CONCAT function from Excel 2021 and Office 365. If you have an older version of Excel, you can use the CONCATENATE function from method 4.
Steps:
- Type this formula to cell D5.
=CONCAT(B5,"-",C5)
The CONCAT function joins values from multiple cell ranges. We have provided a dash to put between the two values.
- Press ENTER.
Values from the “Car Model” and “Year” columns are joined with a dash.
- Bring up the Fill Handle.
- Double Click on the icon (+).
After Double-Clicking, the rest of the cells will be AutoFilled with the formula.
Read More: How to Concatenate Multiple Cells in Excel
3. Combine Two Cells in Excel with a Dash Using the TEXTJOIN Function
We can use the TEXTJOIN function to combine two cells in Excel.
Steps:
- Select cell range D5:D12 as I want to combine all the available values of the dataset.
- Type this formula from below.
=TEXTJOIN("-",TRUE,B5,C5)
We are setting dash as our delimiter. The second value is set to TRUE, which means we’re ignoring the empty cells. You can set it to FALSE to include empty cells. The last two values are our two cells.
- Press CTRL + ENTER.
This will Fill the formula into the selected cells.
The formula should look like this in any of the selected cells.
Read More: Concatenate Multiple Cells Based on Criteria in Excel
4. Applying the CONCATENATE Function to Combine Two Cells in Excel with a Dash
If you are not using Excel 2021 or Office 365, you will not have the CONCAT function. You need to use the CONCATENATE function.
Steps:
- Type the formula in cell D5.
=CONCATENATE(B5,"-",C5)
We are joining cells B5 and C5 with an additional dash.
- Press ENTER.
You can use the Fill Handle to AutoFill the formula to the rest of the cells. However, you can use the Fill Down command to do so too.
- Select cell D6.
- From Home tab >>> Fill >>> Down.
Alternatively, you can use CTRL + D to fill down. You can do this for the rest of the cells.
After, completing the last step, this is how the table should be.
Read More: Combine Multiple Cells into One Separated by Comma in Excel
5. Combine Text and Date with a Dash in Excel
Now, working with dates can be tricky. Our last 4 methods will not work as intended if we worked with dates. Now we have a new dataset. Here, most cars sold on a daily basis are given. We want to add those two columns to our Code column.
Before jumping into the steps, let’s see how the combination would look if we use our Ampersand method.
We can see the date is in a weird format.
To format the dates we need to use the TEXT function.
Steps:
- Type this formula in cell D5.
=TEXT(B5,"dd-mm-yy")&"-"&C5
The TEXT function will format cell B5 as date-month-year. Ampersand will join this formatted value with cell C5.
- Press ENTER.
The Two cells will be joined with a dash.
We can use copy and paste to fill the formula to other cells.
- Select cell D5.
- Press CTRL + C to copy the formula.
- Select cell range D6:D12.
- Press CTRL + V to paste the formula.
Finally, it should look like this.
Read More: Concatenate Multiple Cells but Ignore Blanks in Excel
Practice Section
You can practice these 5 methods using our provided practice tables in the Excel sheet.
Download Practice Workbook
Conclusion
After reading this article you will know 5 methods of how to combine two cells in Excel with a dash. If you face any kind of problems, feel free to comment below. Thanks for reading, keep excelling!