Age formula: Year / Month / Day

Bbro1035

New Member
Joined
Aug 13, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone,

I am working on an excel sheet for a birthday calendar to show how old someone is in Years, Months, and Days.

Right now for testing purposes I am using consecutive days. Photo shows the consecutive days.

This is the Formula I have so far, but I cant seem to get the days to be correct. Is there a way of subtracting all of the days prior to the current month?

=DATEDIF(A1,NOW(),"y") & " Y " & DATEDIF(A1,NOW(),"ym") & " M " & DATEDIF(A1,NOW(),"yd") & " D "

For example today is:
August 13, 2021

I would like:
July 13, 2021 to show "0 Y 1 M 0 D"
July 14, 2021 to show "0 Y 0 M 30 D"

In the end I would like to have a list of birthdays showing Y M D, and Also to be able to take all of the birthday and put them into a calendar automatically if anyone has done this before also.

Thank you,
Bob
 

Attachments

  • Birthday_Excel.jpg
    Birthday_Excel.jpg
    127.4 KB · Views: 19

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Have a try with "md" (Difference in days, ignoring months and years) instead of "yd" (Difference in days, ignoring years):

=DATEDIF(A1;NOW();"y") & " Y " & DATEDIF(A1;NOW();"ym") & " M " & DATEDIF(A1;NOW();"md") & " D "
or even:
=DATEDIF(A1;TODAY();"y") & " Y " & DATEDIF(A1;TODAY();"ym") & " M " & DATEDIF(A1;TODAY();"md") & " D "
 
Upvote 0
Hello Rollis13,

Thank you for your help. I did try your formula but I was getting an error with it. But it did help me figure out that I had yd and it should have been md.


original
=DATEDIF(A2,NOW(),"y") & " Y " & DATEDIF(A2,NOW(),"ym") & " M " & DATEDIF(A2,NOW(),"yd") & " D "
new "Works Now" by changing from "yd" to "md"
=DATEDIF(A1,NOW(),"y") & " Y " & DATEDIF(A1,NOW(),"ym") & " M " & DATEDIF(A1,NOW(),"md") & " D "


Example now that it works!!
Oct / 14 / 20146 Y 9 M 30 D
Apr / 18 / 20156 Y 3 M 26 D
Apr / 23 / 20156 Y 3 M 21 D
Aug / 25 / 20164 Y 11 M 19 D
Mar / 25 / 20192 Y 4 M 19 D
Feb / 27 / 20210 Y 5 M 17 D
Jul / 01 / 20210 Y 1 M 12 D
Jul / 13 / 20210 Y 1 M 0 D
Jul / 14 / 20210 Y 0 M 30 D
Aug / 12 / 20210 Y 0 M 1 D
 
Upvote 0
Sorry, my mistake, forgot to translate ; with , :eek:.
Glad having been of some help(y).
 
Upvote 0
no problem at all. I've been looking at my formula for years and could not figure it, I started a family history sheet a while back and never could figure this out. I just found this forum this morning, and you were super quick to respond, so much appreciated!!
 
Upvote 0

Forum statistics

Threads
1,223,229
Messages
6,170,881
Members
452,364
Latest member
springate

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top