CONVERT YEAR to a DATE

frequency_77

New Member
Joined
Oct 13, 2020
Messages
3
Office Version
  1. 2016
Platform
  1. Windows
Hi all,
I thought this would be a straightforward exercise. I have a column that is a YEAR, but it's a GENERAL data type. I need to convert that to a date, basically the last date of the year, 12/31/2018.

example; 2018 --> 12/31/2018

I have a column that has years beginning from 2018 going to 2000. I need to make this a DATA field, with the last day of the year, FOR ALL THE YEARS.

I tried to use CONCANTENATE, but when I use the formula in the first cell, I grip it and copy all the way down the column it just copy's the same value, 12/31/2018.

Thanks for any help,
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Thanks Dave.
I tried that. It's basically copying "2018" as the year - for all the cells.
 
Upvote 0
Cross posted convert text YEAR to a date

While we do allow Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered elsewhere.
 
Upvote 0
With the year in A1 you could try a formula like this.
Excel Formula:
=DATE(A1+1, 1,0)
 
Upvote 0
Data type shouldn't matter, if it did then it's more likely you would get an error rather than the same value repeated.

Also, in the formula I posted by using +1 the year value should be converted to a numeric value.
 
Upvote 0
try the suggested formulas and ensure you format the result to your preference.

Ensure your information such as 2019 does not contain extra characters.

Cell Formulas
RangeFormula
B1:B2B1=DATE(A1,12,31)
C1:C2C1=DATE(A1,1,0)
D1D1=IF(LEN(A1)=4,DATE(A1,12,31),"")
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,580
Members
448,972
Latest member
Shantanu2024

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