As you know, in Excel, a date is saved as a serial number, and when you want to concatenate two dates, you need to use a specific formula.
In this tutorial, we will look at all those methods that you can use to combine two values in a single cell.
Combine Two Dates using Text Function
In the following example, we have two dates in cell A1 and cell B1. And now we need to combine these two in cell C1.
To write a formula to concatenate two dates, use the following steps:
- First, use the text function, and in the text, the function refers to cell A1 and uses the format “dd-mmm-yyyy” to get the first date as a text.
- After that, use an ampersand to add a text between two dates. You need an ampersand, and then the text, after the text one more ampersand.
- Next, you the text function again and in the text function, refer to cell B1 and use the format “dd-mmm-yyyy” to get the second date as a text.
- In the end, hit enter to get the result in cell C1.
=TEXT(A2,”dd-mmm-yyyy”)&” to “&TEXT(B2,”dd-mmm-yyyy”)
Change Format while Combining Dates
When you combine dates with the text function you have the option to use a different format. In the following example, you can see that we have used a long-date format.
=TEXT(A2,”mmmm dd, yyyy”)&” to “&TEXT(B2,”mmmm dd, yyyy”)
In the same way, you can use a different format of a date and then combine it using the ampersand.