Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have two adjacent columns, one with date values displayed like DD.MM.YYYY and another with only the two last digits in a year value. Example: 03.12.2005 89 11.05.2005 67 31.01.2005 93 I need to replace the first column's year value with the second column's value + 1900. Result wanted: 03.12.1989 11.05.1967 31.01.1993 many years ago I did some excel scripting but I'm definately not capable of solving this now. Thanks a lot if anyone have a minute to show me a macro which solves this issue best regards tor |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Bushtor,
Try: '=====================. Sub Tester() Dim rng As Range Dim rCell As Range Set rng = Range("A1:A10") '<<========= CHANGE For Each rCell In rng.Cells If IsDate(rCell) Then With rCell .Value = DateSerial(rCell(1, 2).Value, _ Month(.Value), Day(.Value)) End With End If Next End Sub '=====================. --- Regards, Norman "bushtor" wrote in message oups.com... Hi, I have two adjacent columns, one with date values displayed like DD.MM.YYYY and another with only the two last digits in a year value. Example: 03.12.2005 89 11.05.2005 67 31.01.2005 93 I need to replace the first column's year value with the second column's value + 1900. Result wanted: 03.12.1989 11.05.1967 31.01.1993 many years ago I did some excel scripting but I'm definately not capable of solving this now. Thanks a lot if anyone have a minute to show me a macro which solves this issue best regards tor |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
change year date | New Users to Excel | |||
change year date | Excel Discussion (Misc queries) | |||
change year date | Excel Worksheet Functions | |||
change year date | New Users to Excel | |||
Change date by one year | New Users to Excel |