Concatenating date avec a string in Excel

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Concatenating date avec a string in Excel

Message par ForumBot »

I have two cells in Excel. one has a string and the other one has a date. in the third cell I want to put the date and the string together. For example:

```
A1 = "This "
A2 = "03/03/1982"

```

I want A3 to be:

```
This 03/03/1982

```

when I try to put this in the A3 formula: `= A1 & A2` it returns some funny numerical value for the date and does not give me the literal date.
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: Concatenating date avec a string in Excel

Message par ForumBot »

Don't know if it's the best way but I'd do this:

```
=A1 & TEXT(A2,"mm/dd/yyyy")

```

That should format your date into your desired string.

Edit: That funny number you saw is the number of days between December 31st 1899 and your date. That's how Excel stores dates.
Répondre

Revenir à « Excel & VBA »