Excel converts a date to text - how to change back to date

Pumpk1n

Board Regular
Joined
Jan 31, 2017
Messages
86
Office Version
  1. 365
Platform
  1. Windows
I have a formula "=sheet1!C2" excel displays 9/10/18. When I update th formula to be "=sheet1!C2 & " - " &Sheet1!D2", EXCEL
displays 43353 - 43357; I want it to display 9/10/18 - 9/17/18. What do I need to add to the formula. Thanks!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
That is because dates really are numbers (the number of days since 1/0/1900) with a special format in Excel. Formatting does not carry over in formulas.
So, just format the numbers the same way in your formula using the TEXT function.
Code:
[COLOR=#333333]=TEXT(Sheet1!C2,"M/D/YY") & " - " & TEXT(Sheet1!D2,"M/D/YY")[/COLOR]
 
Last edited:
Upvote 0
That is because dates really are numbers (the number of days since 1/0/1900) with a special format in Excel. Formatting does not carry over in formulas.
So, just format the numbers the same way in your formula using the TEXT function.
Code:
[COLOR=#333333]=TEXT(Sheet1!C2,"M/D/YY") & " - " & TEXT(Sheet1!D2,"M/D/YY")[/COLOR]
Probably a little less clear, but you can eliminate Excel having to perform one concatenation by embedding the space/dash/space delimiter within the first (or second if you would rather) TEXT function call...

=TEXT(Sheet1!C2,"M/D/YY - ")&TEXT(Sheet1!D2,"M/D/YY")
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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