![]() |
![]() |
|
|||||||
| 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 |
|
Board Regular
Join Date: Apr 2002
Location: Rhode Island
Posts: 128
|
I have to (quickly) figure out the age of all of our employees. I have their dates of birth. Is there a calculation or function that will help me do this?
|
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: The Hague
Posts: 50,319
|
Quote:
or =DATEDIF(dob-cell,TODAY(),"y") [ This Message was edited by: Aladin Akyurek on 2002-05-22 11:51 ] |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Calgary, Alberta Canada
Posts: 2,065
|
[quote]
On 2002-05-22 11:48, LoriD wrote: I have to (quickly) figure out the age of all of our employees. I have their dates of birth. Is there a calculation or function that will help me do this? To calculate the difference in years, with Earliest Date in A1 and Latest date in B1, use =Datedif(A1,B1,"y") You could use today() for latest date. You can expand Datedif to show months, and days. The following also includes text "Years" etc. =DATEDIF(A1,B1,"y")&" years "&DATEDIF(A1,B1,"ym")&" months "&DATEDIF(A1,B1,"md")& " days" or =DATEDIF(A2,TODAY(),"y")&" years "&DATEDIF(A2,TODAY(),"ym")&" months "&DATEDIF(A2,TODAY(),"md")& " days" Notes: 1. Datedif is in most versions of Excel; however, it was only documented in Excel 2000. 2. It is a regular function; you do not have to activate Analysis ToolPak. 3. Results are good for years and months. There are some unusual results( anomolies) with the number of days. The anomolies occur because of the various number of days in months. |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Apr 2002
Location: Rhode Island
Posts: 128
|
Than you both very much!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|