![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: May 2002
Posts: 2
|
If I have today's date in 1st cell and date of birth in 2nd cell, how do I get 3rd cell to show age?
Help please |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
|
Quote:
=DATEDIF(B2,A2,"y") or =YEARFRAC(B2,A2) where B2 houses a bith date and A2 the formula =TODAY(). For YEARFRAC, you need the Analysis Toolpak add-inn that you can activate via Tools|Add-Ins. |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Georgia USA
Posts: 544
|
You could also use this to return the time in years months and days, with B4 having the birthday and B3 having the formula =Today(). Change cell references as needed
=DATEDIF(B4,$B$3,"y")&"y,"&DATEDIF(B4,$B$3,"ym")&"m,"&DATEDIF(B4,$B$3,"md")&"d" |
|
|
|
|
|
#4 |
|
New Member
Join Date: May 2002
Posts: 2
|
Many thanks, problem solved!
|
|
|
|
|
|
#5 | |
|
Join Date: May 2002
Posts: 73
|
Quote:
Be wary about using this sort of formula. You might not always get the sort of results you expect. For example for someone born on 1 Mar 1950, the age on 1 Jun 2002 produced by the formula will be 52y-3m-0d However, for somenoe born 1 day earlier on 28 Feb 1950, the age will be 4 days older (instead of 1 day) at 52y-3m-4d |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|