Formula to compute someone's age if you enter their B-day
I'm trying to find out the formula that will allow someone to enter a child's
birthday in one cell and another cell will compute their age. |
Formula to compute someone's age if you enter their B-day
and today's date is in A2
-- Gary''s Student "Millerk" wrote: I'm trying to find out the formula that will allow someone to enter a child's birthday in one cell and another cell will compute their age. |
Formula to compute someone's age if you enter their B-day
=DATEDIF(A1,A2,"y") & " years, " & DATEDIF(A1,A2,"ym") & " months, " &
DATEDIF(A1,A2,"md") & " days" if the birthday is in A1 -- Gary's Student "Millerk" wrote: I'm trying to find out the formula that will allow someone to enter a child's birthday in one cell and another cell will compute their age. |
Formula to compute someone's age if you enter their B-day
You can put today() in any cell ie a1 then put the date you want ie
02/17/1989 in say a2. Then in b2 put =year(a1)-year(a2). This will give you the age. Be sure to make b2 or the cell the formulars in a number format. John "Millerk" wrote: I'm trying to find out the formula that will allow someone to enter a child's birthday in one cell and another cell will compute their age. |
Formula to compute someone's age if you enter their B-day
First, thank you very much for the formula.
Second, how can I set up a condition formula using this formula so that the cell will be yellow 5 days prior to their birthday and red up to 5 days after their birthday. "Gary''s Student" wrote: =DATEDIF(A1,A2,"y") & " years, " & DATEDIF(A1,A2,"ym") & " months, " & DATEDIF(A1,A2,"md") & " days" if the birthday is in A1 -- Gary's Student "Millerk" wrote: I'm trying to find out the formula that will allow someone to enter a child's birthday in one cell and another cell will compute their age. |
Formula to compute someone's age if you enter their B-day
I used the following formula to compute the DOB in order to not have to use
multiple cells. =DATEDIF(C5,NOW(),"y") where C5 has DOB and formula is in D5 The problem with this is that if nothing is entered in C5 then it gives me a solution of 106 instead of leaving it blank. What am I doing wrong here? "Gary''s Student" wrote: =DATEDIF(A1,A2,"y") & " years, " & DATEDIF(A1,A2,"ym") & " months, " & DATEDIF(A1,A2,"md") & " days" if the birthday is in A1 -- Gary's Student "Millerk" wrote: I'm trying to find out the formula that will allow someone to enter a child's birthday in one cell and another cell will compute their age. |
Formula to compute someone's age if you enter their B-day
Why wouldn't =(NOW()-A1)/365 work. It does not account
for leap years, but how accurate do you need to be? |
Formula to compute someone's age if you enter their B-day
Dates are stored in Excel as the number of days elapsed since some
reference date - the date is 31st December 1899. So, if C5 is empty, there are 106 years between the reference date and today. To guard against this you could have something like: =IF(C5=0,0,DATEDIF(C5,NOW(),"y")) Hope this helps. Pete |
Formula to compute someone's age if you enter their B-day
Pete,
Thanks for the formula. I fooled around with it after I posted the question and came up with a very similar formula that seems to be working. =IF(C5="","",DATEDIF(C5,NOW(),"y")) I guess the ""= 0 in this case. Thanks for the response. "Pete_UK" wrote: Dates are stored in Excel as the number of days elapsed since some reference date - the date is 31st December 1899. So, if C5 is empty, there are 106 years between the reference date and today. To guard against this you could have something like: =IF(C5=0,0,DATEDIF(C5,NOW(),"y")) Hope this helps. Pete |
Formula to compute someone's age if you enter their B-day
Thanks for feeding back, glad you got it working.
Pete |
All times are GMT +1. The time now is 01:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com