Merging two Date Formats

Sarah Dwyer

New Member
Joined
Nov 17, 2019
Messages
4
Hello,

I need to create a column with just a year of birth like '1990' from two columns that currently have a mix of '12/05/2018' and '2018'

for example either column may have 12/0/2018 format another column may have '2018' format I want to keep the '2018' format only in a new column "F' with just '2018'
 

Attachments

  • Dates.JPG
    Dates.JPG
    41.1 KB · Views: 9

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Welcome to the MrExcel board!

What do you want to do with the row that says 1/05/1986 and 1990 in the other column? Similar for the row where your cursor is shown.

BTW, you will get much better response if you show data that can be copied, rather than just an image from which helpers would have to manually type the data to test. ;)
 
Last edited:
Upvote 0
Hello Peter,

Thanks for replying. I want a new column with just the year of birth I've named this Year only below. So if Column A Date of Birth has 01/05/1986 and Column B has 1990 or vice versa, I want column C to return 1990. We only need year of births to be collected not full date of births. This is a database that has been collecting both and we want to re-import the data with just the year of birth. See spreadsheet below. In the column that says Year Only I have typed in what I want the formula to return. I just need the formula. I hope this helps. Really appreciate your expertise.

Date of birthYear of birthYear only
1966​
1966​
1965​
1965​
1/05/1986​
1990​
1990​
1/01/1990​
1990​
1/01/1984​
1984​
1/05/1971​
1971​
1959​
1959​
19/04/1941​
1941​
1963​
1963​
12/05/2018​
1/01/1980​
1980​
1993​
1993​
1979​
1979​
11/02/1935​
1935​
1981​
1981​
1/01/1965​
1/01/1965​
1965​
21/01/1964​
1964​
1964​
1963​
1963​
 
Upvote 0
We only need year of births to be collected not full date of births.
OK, understand that but how you can have a date of birth of 1/05/1986 yet a year of birth of 1990 is beyond me. :confused:

So, see if this is what you want.

Also suggest that you have a look in my signature block below for help with how to post screen shots/data like this.

Book1
CDEF
1Date of birthYear of birthYear only
219661966
3 
419651965
5 
61/05/198619901990
71/01/199019901990
8 
91/01/19841984
10 
11 
121/05/19711971
13 
14 
1519591959
1619/04/19411941
17 
1819631963
19 
20 
21 
22 
2312/05/20181/01/19801980
2419931993
2519791979
26 
2711/02/19351935
28 
29 
3019811981
31 
32 
331/01/19651/01/19651965
3421/01/196419641964
3519631963
Year only
Cell Formulas
RangeFormula
F2:F35F2=IF(C2&E2="","",RIGHT(IF(C2="","",IF(C2<3000,C2,YEAR(C2)))&IF(E2="","",IF(E2<3000,E2,YEAR(E2))),4)+0)
 
Last edited:
Upvote 0
when I got to Browse I did not know what to do next?
You need to use that browse window to browse to wherever you saved the Add-In file at the very first Download step and click on it
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,694
Members
448,979
Latest member
DET4492

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