Article ID: 123575
Article Last Modified on 10/11/2006
Sub ConvertInteger()
' Extract the first two digits.
yr = Fix(ActiveCell * 0.0001)
' Extract the second two digits.
mo = Right(Fix((ActiveCell - (yr * 10000)) * 0.01), 2)
' Extract the last two digits.
dy = ActiveCell - (Fix(ActiveCell * 0.01) * 100)
' Return the result to the original cell in Microsoft Excel date
' format.
ActiveCell.Value = DateSerial(yr, mo, dy)
End Sub
Additional query words: 5.00a 5.00c 7.00a XL98 XL97 XL7 XL5 XL
Keywords: kbhowto kbprogramming kbdtacode KB123575