Forum Discussion
Mitchell Hogg
Dec 20, 2016Copper Contributor
TYPE FUNCTION to Merge MM/DD with YYYY
I defined cell A1 to contain 01/01 and cell B1 to contain 2017, both stored as text.
Using =TYPE(A1&"/"&B1) it displays as Monday, January 02, 1900.
I expected Sunday, January 01, 2017.
The Evaluate Formula does show at one level TYPE("01/01/2017") then the next level is the Monday, January 02, 1900 value.
Try to correct for the wrong day I changed the formula to =TYPE(A1&"/"&B1)-1 resulting in Sunday, January 01, 1900; thus the Day of the week and Day of the Month corrected but the year is still 1900.
This is Excel 2013.
4 Replies
Sort By
Mitchell Hogg, the TEXT function will give you what you need
=TEXT(A1&"/"&B1,"dddd, mmmm, dd, yyyy")
- Mitchell HoggCopper Contributor
Thank you. I used TEXT as described and all is well.
- Detlef_LewinSilver ContributorHi Mitchell Are you sure you want to use the function TYPE()? TYPE() does not return a date. https://support.office.com/en-us/article/TYPE-function-45b4e688-4bc3-48b3-a105-ffa892995899?ui=en-US&rs=en-US&ad=US&fromAR=1
- Mitchell HoggCopper Contributor
You are correct that TYPE is the incorrect Function to accomplish the task at hand. Thank you. I received another reply that TEXT would do what I need to do.