Hi Dominique,
Thank you for your help but I need to calculate the age of a certain people using the excel
I need the answer in day, month, year. I ve the date of birth and i want to calculate the age.
Hi Dominique,
Thank you for your help but I need to calculate the age of a certain people using the excel
I need the answer in day, month, year. I ve the date of birth and i want to calculate the age.
One way is to format the result as custom and then enter "yy m d"
or simply use the following formula in your cell
=TEXT(B1-A1,"y m d")
- Mangesh
By formating the result as custom and then enter "yy m d"
Difference between date of birth ( 23 / 1 / 1977) and as of today ( 19 /5 / 2005) is 28 years 4 months and 25 days which is not accurate, the right answer is 28 years 3 months and 26 days.
Could you please help solving this.
Sorry, my mistake. Thats not correct actually.
Try this instead:
=YEAR(A2)-YEAR(A1)-IF(MONTH(A2)>=MONTH(A1),0,1) & " " & MONTH(A2)-MONTH(A1)-IF(DAY(A2)>=DAY(A1),0,1) & " " & IF(DAY(A2)-DAY(A1)<0,DAY(DATE(YEAR(A2),MONTH(A2),1)-1)+(DAY(A2)-DAY(A1)),DAY(A2)-DAY(A1))
Not fullly tested
A1 = start date
A2 = end date
- Mangesh
A slight varaition:
=YEAR(A2)-YEAR(A1)-IF(MONTH(A2)>=MONTH(A1),0,1) & " " & 12-(MONTH(A2)-MONTH(A1))-IF(DAY(A2)>=DAY(A1),0,1) & " " & IF(DAY(A2)-DAY(A1)<0,DAY(DATE(YEAR(A2),MONTH(A2),1)-1)+(DAY(A2)-DAY(A1)),DAY(A2)-DAY(A1))
- Mangesh
Wrong formula still trying to get it. Thank you for your help
can you give an example where it is failing
Mangesh
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks