Tom.Jones
Well-known Member
- Joined
- Sep 20, 2011
- Messages
- 524
- Office Version
- 365
- 2016
- Platform
- Windows
- Mobile
Hi,
This VBA code was written by Peter_SSs, in "Full Date of Birth YYYY-MM-DD from 6 char. String YYMMDD"
@Peter_SSs
please modify the VBA code to extract data (something like AKOsman1 post) with difference that numbers in column A (starting in A2)
are like this:
1 or 2 in front of say 470207 mean year is from 1900 to 1999
3 or 4 front of say 470207 mean year is from 1800 to 1899
5 or 6 in front of say 050207 mean year is from 2000 to 2999
In column A numbers is like:
1470207 in column B will be 1947-02-07 or if is possible 07.02.1947 (european date)
5050207 in column B will be 2005-02-07 or if is possible 07.02.2005
Thank you.
This VBA code was written by Peter_SSs, in "Full Date of Birth YYYY-MM-DD from 6 char. String YYMMDD"
VBA Code:
Sub Extract_Date_Text()
With Range("B2:B" & Range("A" & Rows.Count).End(xlUp).Row)
.NumberFormat = "@"
.Value = Evaluate(Replace("TEXT(20-(LEFT(#,2)-45>0)&LEFT(#,6),""0-00-00"")", "#", .Offset(, -1).Address))
End With
End Sub
@Peter_SSs
please modify the VBA code to extract data (something like AKOsman1 post) with difference that numbers in column A (starting in A2)
are like this:
1 or 2 in front of say 470207 mean year is from 1900 to 1999
3 or 4 front of say 470207 mean year is from 1800 to 1899
5 or 6 in front of say 050207 mean year is from 2000 to 2999
In column A numbers is like:
1470207 in column B will be 1947-02-07 or if is possible 07.02.1947 (european date)
5050207 in column B will be 2005-02-07 or if is possible 07.02.2005
Thank you.
Last edited: