Home Excel Powerpoint Word Outlook Error Codes

VBA Useful Codes

Welcome to the World of VBA
Home > VBAUsefulCodes

Get Age Based on the Date Of Birth


Calculate the age from the date of birth. Age is calculated in years.

Sub getage()
MsgBox Age2(CDate("05-July-1988"))
End Sub

Function Age2(DOB)
Age2 = Int((Now() - DOB) / 365.25) & " Years old"
End Function

Subscribe

Enter your e-mail below and get notified on the latest blog posts.




Tags

VBA Outlook KPI Excel Alt+F11 Dashboards Macros Recording Graphs Automation Developer WaterFall Powerpoint Charts Pivot Tables Forecast Charts


Follow Us