In Excel can you calculate age from two given dates? in Excel General Questions  
 |  Edit my Profile  |  Help
 
     
  
 
 
 
Pate 5/24/2005 2:07 PM PST
  Question
  We are using Excel as a manual log of visits. We would like to screen out
anyone that is not 18 years old and were looking for a means of calculating
the age from the current date and the date of birth. Is there a function that
can do this?
 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
Bob Phillips 5/24/2005 2:30 PM PST
  Answer
  =DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " &
DATEDIF(A1,NOW(),"md") & " days"
--

HTH


RP
(remove nothere from the email address if mailing direct)


"Pate" <Pate@discussions.microsoft.com> wrote in message
news:C3AC0970-ACEF-41E1-9D13-F776891DDD33@microsoft.com...
> We are using Excel as a manual log of visits. We would like to screen out
> anyone that is not 18 years old and were looking for a means of
calculating
> the age from the current date and the date of birth. Is there a function
that
> can do this?


 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
JE McGimpsey 5/24/2005 2:47 PM PST
   
  Note that this gives nonsense answers when the beginning month is longer
than the end month:

on 1 March 2006, this formula will, for

A1: 31 January 1988

return "17 years, 1 months, -2 days"

Since you don't need the days, better to ditch the extra functions and
use

=DATEDIF(A1, TODAY(), "y") & " years old"

or,

=IF(DATEDIF(A1,TODAY(),"y")>=18,"OK","Too young")



(You could use NOW(), instead, but adding the time doesn't matter with
DATEDIF)


In article <#mdcNcKYFHA.1152@tk2msftngp13.phx.gbl>,
"Bob Phillips" <bob.phillips@notheretiscali.co.uk> wrote:

> =DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " &
> DATEDIF(A1,NOW(),"md") & " days"
 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
RAJ KAPADIA, SURAT, INDIA 10/20/2008 7:05 AM PST
   
  in excel i want to calculate days between two dates

for e. g.

16/10/2008 minus 14/08/2008
(dd/mm/yyyy)

please explain and if possible give me an example.

my alernate email address is

rajmkapadia@gmai.com

please help me out

thanks

=raj kapadia, surat, india

"Bob Phillips" wrote:

> =DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " &
> DATEDIF(A1,NOW(),"md") & " days"
> --
>
> HTH
>
>
> RP
> (remove nothere from the email address if mailing direct)
>
>
> "Pate" <Pate@discussions.microsoft.com> wrote in message
> news:C3AC0970-ACEF-41E1-9D13-F776891DDD33@microsoft.com...
> > We are using Excel as a manual log of visits. We would like to screen out
> > anyone that is not 18 years old and were looking for a means of
> calculating
> > the age from the current date and the date of birth. Is there a function
> that
> > can do this?
>
>
>
 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
David Biddulph 10/20/2008 10:09 AM PST
   
  Yes you got it right in saying "16/10/2008 minus 14/08/2008".

If your dates are in A2 and B2 respectively, the formula for the number of
days is =A2-B2. The explanation is that Excel dates are stored as a number
of days from an origin at the start of 1900 (or of 1904, depending on which
options you have set).

Note that when you ask a question in a newsgroup, the answer comes in the
newsgroup, not by e-mail. The reason for that is so that the answer can be
of use to other readers of the group (and so that other contributors can
correct me when I've got it wrong).
--
David Biddulph

"RAJ KAPADIA, SURAT, INDIA" <RAJ KAPADIA, SURAT,
INDIA@discussions.microsoft.com> wrote in message
news:B1BBC7A9-6920-4FDB-935E-D92F7CF197E1@microsoft.com...
> in excel i want to calculate days between two dates
>
> for e. g.
>
> 16/10/2008 minus 14/08/2008
> (dd/mm/yyyy)
>
> please explain and if possible give me an example.
>
> my alernate email address is
>
> rajmkapadia@gmai.com
>
> please help me out
>
> thanks
>
> =raj kapadia, surat, india
>
> "Bob Phillips" wrote:
>
>> =DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months,
>> " &
>> DATEDIF(A1,NOW(),"md") & " days"
>> --
>>
>> HTH
>>
>>
>> RP
>> (remove nothere from the email address if mailing direct)
>>
>>
>> "Pate" <Pate@discussions.microsoft.com> wrote in message
>> news:C3AC0970-ACEF-41E1-9D13-F776891DDD33@microsoft.com...
>> > We are using Excel as a manual log of visits. We would like to screen
>> > out
>> > anyone that is not 18 years old and were looking for a means of
>> calculating
>> > the age from the current date and the date of birth. Is there a
>> > function
>> that
>> > can do this?
>>
>>
>>


 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
coffeemom 9/30/2009 5:15 PM PST
   
  Bob you saved my day! I was trying to figure out how to get the yrs and
months of students birhtdates for a standardized test spread sheet and your
formula was right on the money! You sved me many hours of number crunching.
I owe you a beer!
Coffeemom

"Bob Phillips" wrote:

> =DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " &
> DATEDIF(A1,NOW(),"md") & " days"
> --
>
> HTH
>
>
> RP
> (remove nothere from the email address if mailing direct)
>
>
> "Pate" <Pate@discussions.microsoft.com> wrote in message
> news:C3AC0970-ACEF-41E1-9D13-F776891DDD33@microsoft.com...
> > We are using Excel as a manual log of visits. We would like to screen out
> > anyone that is not 18 years old and were looking for a means of
> calculating
> > the age from the current date and the date of birth. Is there a function
> that
> > can do this?
>
>
>
 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
bigwheel 5/24/2005 2:31 PM PST
  Answer
  Take a look at http://www.cpearson.com/excel/datedif.htm#Age

"Pate" wrote:

> We are using Excel as a manual log of visits. We would like to screen out
> anyone that is not 18 years old and were looking for a means of calculating
> the age from the current date and the date of birth. Is there a function that
> can do this?
 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
Alan 5/24/2005 2:32 PM PST
  Answer
  One way,
with the DOB in A1 and =TODAY() in B1
=(B1-A1)/365.25
Format the cell this is in as Number,
Regards,
Alan
"Pate" <Pate@discussions.microsoft.com> wrote in message
news:C3AC0970-ACEF-41E1-9D13-F776891DDD33@microsoft.com...
> We are using Excel as a manual log of visits. We would like to screen out
> anyone that is not 18 years old and were looking for a means of
> calculating
> the age from the current date and the date of birth. Is there a function
> that
> can do this?


 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
NANCY QIP 10/2/2008 12:06 PM PST
   
 

"Pate" wrote:

> We are using Excel as a manual log of visits. We would like to screen out
> anyone that is not 18 years old and were looking for a means of calculating
> the age from the current date and the date of birth. Is there a function that
> can do this?
 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
NANCY QIP 10/2/2008 12:17 PM PST
   
 

"Pate" wrote:

> We are using Excel as a manual log of visits. We would like to screen out
> anyone that is not 18 years old and were looking for a means of calculating
> the age from the current date and the date of birth. Is there a function that
> can do this?
 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
Pete_UK 10/2/2008 5:09 PM PST
   
  Chip Pearson shows how at this link:

http://www.cpearson.com/excel/datedif.aspx

Hope this helps.

Pete

On Oct 2, 8:18 pm, NANCY QIP <NANCY...@discussions.microsoft.com>
wrote:
> "Pate" wrote:
> > We are using Excel as a manual log of visits. We would like to screen out
> > anyone that is not 18 years old and were looking for a means of calculating
> > the age from the current date and the date of birth. Is there a function that
> > can do this?- Hide quoted text -
>
> - Show quoted text -

 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
 
 
RAJ KAPADIA, SURAT, INDIA 10/20/2008 7:11 AM PST
   
  i want to calculate days between two dates

eg 16/10/2008 minus 14/08/2008
(dd/mm/yyyy)

pls explain giving example at my email address

rajmkapadia@gmail.com

thanks

=raj kapadia, surat, india

"Pate" wrote:

> We are using Excel as a manual log of visits. We would like to screen out
> anyone that is not 18 years old and were looking for a means of calculating
> the age from the current date and the date of birth. Is there a function that
> can do this?
 
  Was this post helpful to you?  
 
 
  Reply | Print post   TopTop  
 
 
  Return to Microsoft Communities  Notify me of replies