gibt es eine Möglichkeit (Formel) in eine Zelle das Geburtsdatum einzugebén um in gleicher Zelle das Lebensalter angezeigt zu bekommen? Mit Hilfszelle(n) ist das kein Problem.
Gruss
Rosi
A | B | C | |
1 | Name | Geburtsdatum | Alter |
2 | wilhelm | 15.01.1953 | 56 |
3 | klaus | 18.05.1982 | 27 |
4 | gabi | 22.10.1975 | 34 |
5 | rosi | 18.12.1980 | 28 |
Formeln der Tabelle | ||||
|
Private Sub Workbook_Open()
Dim loZeile As Long, lstrDatum As String
With Sheets("Tabelle1") ' 0 Then
lstrDatum = .Range("C" & loZeile).FormulaLocal
lstrDatum = Right(lstrDatum, Len(lstrDatum) - 7)
lstrDatum = Left(lstrDatum, Len(lstrDatum) - 2)
If CDate(Left(lstrDatum, 6) & Year(Date))