Date changing to number when using formula

jwoww

New Member
Joined
May 29, 2021
Messages
22
Office Version
  1. 365
I'm using the concat formula and among the cells it is selecting, some contain dates. when it transfers to the new cell instead of showing the dates it changes to a number and i have to go in and manually adjust, negating me using a formula to join various cells together.

An example of my formula is
=CONCAT(E165&" "&F165&" "&G165&". Marries "&J165&" on "&O165&". Is the first child of "&U165)
where the following cells equate to a date
F165
G165
O165

is there a way to fix this?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
You will need to apply a date format to your dates.
In Australia we use "dd/mm/yyyy", in the below change that to what you need in your region, it will flow through to the 3 values (cols F,G & O)

Excel Formula:
=LET(dtFmt,"dd/mm/yyyy",
CONCAT(E165&" "&TEXT(F165,dtFmt)&" "&TEXT(G165,dtFmt)&". Marries "&J165&" on "&TEXT(O165,dtFmt)&". Is the first child of "&U165))
 
Upvote 0
Solution
I'm using the concat formula and among the cells it is selecting, some contain dates. when it transfers to the new cell instead of showing the dates it changes to a number and i have to go in and manually adjust, negating me using a formula to join various cells together.

An example of my formula is
=CONCAT(E165&" "&F165&" "&G165&". Marries "&J165&" on "&O165&". Is the first child of "&U165)
where the following cells equate to a date
F165
G165
O165

is there a way to fix this?
It's not changing to a number, dates are stored as numbers.

It is the number of days since 01/01/1900

Wrap each cell reference in the TEXT function.

e.g. TEXT(C7,"dd/mm/yyyy")
 
Upvote 0
You will need to apply a date format to your dates.
In Australia we use "dd/mm/yyyy", in the below change that to what you need in your region, it will flow through to the 3 values (cols F,G & O)
Also since you are using "&" instead of a comma, the concat function isn't adding any value, so it can be simplified to:
Excel Formula:
=LET(dtFmt,"dd/mm/yyyy",
E165&" "&TEXT(F165,dtFmt)&" "&TEXT(G165,dtFmt)&". Marries "&J165&" on "&TEXT(O165,dtFmt)&". Is the first child of "&U165)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,068
Messages
6,122,950
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top