Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Millerk
 
Posts: n/a
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default 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.

  #3   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default 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.

  #4   Report Post  
Posted to microsoft.public.excel.misc
John K
 
Posts: n/a
Default 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.

  #5   Report Post  
Posted to microsoft.public.excel.misc
Millerk
 
Posts: n/a
Default 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.



  #6   Report Post  
Posted to microsoft.public.excel.misc
Millerk
 
Posts: n/a
Default 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.

  #7   Report Post  
Posted to microsoft.public.excel.misc
Bill (Unique as my name)
 
Posts: n/a
Default 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?

  #8   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK
 
Posts: n/a
Default 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

  #9   Report Post  
Posted to microsoft.public.excel.misc
Millerk
 
Posts: n/a
Default 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


  #10   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK
 
Posts: n/a
Default Formula to compute someone's age if you enter their B-day

Thanks for feeding back, glad you got it working.

Pete

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Match then lookup Tenacity Excel Worksheet Functions 9 December 3rd 05 05:30 AM
How do I enter formula for < or numbers. Betty P. Excel Worksheet Functions 7 November 27th 05 06:25 PM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Proper way to enter array formula Phil Excel Worksheet Functions 3 October 20th 05 02:44 PM
Can you enter a formula in a cell to run a macro? Nevaeh Excel Worksheet Functions 2 February 14th 05 11:51 PM


All times are GMT +1. The time now is 06:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"