ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   calculate age from 2 dates in yy,mm,dd format in excel (https://www.excelbanter.com/excel-worksheet-functions/113697-calculate-age-2-dates-yy-mm-dd-format-excel.html)

Jan

calculate age from 2 dates in yy,mm,dd format in excel
 
using excel 2003. try to calculate age from date of birth and another date.

Epinn

calculate age from 2 dates in yy,mm,dd format in excel
 
In case you want to do some reading while you wait for an answer ......

http://www.cpearson.com/excel/datedif.htm#Age

Epinn

"jan" wrote in message ...
using excel 2003. try to calculate age from date of birth and another date.


Epinn

calculate age from 2 dates in yy,mm,dd format in excel
 
From the link:

Calculating A Person's Age

A frequent use of the DATEDIF is to compute someone's age based on the current date and their birthday. The formula below will return someone's exact age based on their birthday in cell A1.


=DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " & DATEDIF(A1,NOW(),"md") & " days"

This will return a string like

33 years, 9 months, 18 days



"Epinn" wrote in message ...
In case you want to do some reading while you wait for an answer ......

http://www.cpearson.com/excel/datedif.htm#Age

Epinn

"jan" wrote in message ...
using excel 2003. try to calculate age from date of birth and another date.



Pete_UK

calculate age from 2 dates in yy,mm,dd format in excel
 
I'm not sure why Chip used NOW() instead of TODAY(), and by having it
in the formula 3 times, surely this will take longer to calculate than
once in a cell (I know you are keen on timings in formulae, Epinn).

Pete

Epinn wrote:
From the link:

Calculating A Person's Age

A frequent use of the DATEDIF is to compute someone's age based on the current date and their birthday. The formula below will return someone's exact age based on their birthday in cell A1.


=DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " & DATEDIF(A1,NOW(),"md") & " days"

This will return a string like

33 years, 9 months, 18 days



"Epinn" wrote in message ...
In case you want to do some reading while you wait for an answer ......

http://www.cpearson.com/excel/datedif.htm#Age

Epinn

"jan" wrote in message ...
using excel 2003. try to calculate age from date of birth and another date.



Jim Thomlinson

calculate age from 2 dates in yy,mm,dd format in excel
 
So how would you make it faster??? Both Now and Today are volatile so there
is no real advantage to using either one in the context they are being used
and the formula is concatenating 3 calculations together so it requires
getting the current date 3 times. While you could put Now (or Today) in a
seperate cell any gains in speed by only calculating the value once will be
lost in the fact that you now have 3 references to that volatile cell.
--
HTH...

Jim Thomlinson


"Pete_UK" wrote:

I'm not sure why Chip used NOW() instead of TODAY(), and by having it
in the formula 3 times, surely this will take longer to calculate than
once in a cell (I know you are keen on timings in formulae, Epinn).

Pete

Epinn wrote:
From the link:

Calculating A Person's Age

A frequent use of the DATEDIF is to compute someone's age based on the current date and their birthday. The formula below will return someone's exact age based on their birthday in cell A1.


=DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " & DATEDIF(A1,NOW(),"md") & " days"

This will return a string like

33 years, 9 months, 18 days



"Epinn" wrote in message ...
In case you want to do some reading while you wait for an answer ......

http://www.cpearson.com/excel/datedif.htm#Age

Epinn

"jan" wrote in message ...
using excel 2003. try to calculate age from date of birth and another date.




Jim Thomlinson

calculate age from 2 dates in yy,mm,dd format in excel
 
Purely out of idle curriosity I bench marked both your function and Chips
using both Today and Now. Calculated 100,000 times the functions randomly
took between 15 and 25 seconds to calculate, with no significant differences
between the different methods... The moral of the story is do it how ever you
want...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

So how would you make it faster??? Both Now and Today are volatile so there
is no real advantage to using either one in the context they are being used
and the formula is concatenating 3 calculations together so it requires
getting the current date 3 times. While you could put Now (or Today) in a
seperate cell any gains in speed by only calculating the value once will be
lost in the fact that you now have 3 references to that volatile cell.
--
HTH...

Jim Thomlinson


"Pete_UK" wrote:

I'm not sure why Chip used NOW() instead of TODAY(), and by having it
in the formula 3 times, surely this will take longer to calculate than
once in a cell (I know you are keen on timings in formulae, Epinn).

Pete

Epinn wrote:
From the link:

Calculating A Person's Age

A frequent use of the DATEDIF is to compute someone's age based on the current date and their birthday. The formula below will return someone's exact age based on their birthday in cell A1.


=DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " & DATEDIF(A1,NOW(),"md") & " days"

This will return a string like

33 years, 9 months, 18 days



"Epinn" wrote in message ...
In case you want to do some reading while you wait for an answer ......

http://www.cpearson.com/excel/datedif.htm#Age

Epinn

"jan" wrote in message ...
using excel 2003. try to calculate age from date of birth and another date.




Dave F

calculate age from 2 dates in yy,mm,dd format in excel
 
I'm getting between 3 and 4 seconds to calculate 65000 rows with either of
these two formulas....
--
Brevity is the soul of wit.


"Jim Thomlinson" wrote:

Purely out of idle curriosity I bench marked both your function and Chips
using both Today and Now. Calculated 100,000 times the functions randomly
took between 15 and 25 seconds to calculate, with no significant differences
between the different methods... The moral of the story is do it how ever you
want...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

So how would you make it faster??? Both Now and Today are volatile so there
is no real advantage to using either one in the context they are being used
and the formula is concatenating 3 calculations together so it requires
getting the current date 3 times. While you could put Now (or Today) in a
seperate cell any gains in speed by only calculating the value once will be
lost in the fact that you now have 3 references to that volatile cell.
--
HTH...

Jim Thomlinson


"Pete_UK" wrote:

I'm not sure why Chip used NOW() instead of TODAY(), and by having it
in the formula 3 times, surely this will take longer to calculate than
once in a cell (I know you are keen on timings in formulae, Epinn).

Pete

Epinn wrote:
From the link:

Calculating A Person's Age

A frequent use of the DATEDIF is to compute someone's age based on the current date and their birthday. The formula below will return someone's exact age based on their birthday in cell A1.


=DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " & DATEDIF(A1,NOW(),"md") & " days"

This will return a string like

33 years, 9 months, 18 days



"Epinn" wrote in message ...
In case you want to do some reading while you wait for an answer ......

http://www.cpearson.com/excel/datedif.htm#Age

Epinn

"jan" wrote in message ...
using excel 2003. try to calculate age from date of birth and another date.



Pete_UK

calculate age from 2 dates in yy,mm,dd format in excel
 
Thanks for that, Jim.

I would have thought, intuitively, that for Excel to bring the full
system date and time from wherever it is stored in memory would take
longer than if it only needs to fetch the system date (fewer bytes to
copy), hence my suggestion to use TODAY() rather than NOW(). Obviously,
the overhead to convert those bytes into Excel's floating point format
is greater than the time taken to fetch.

I also felt, instinctively, that by having the function once in a cell
and then referring to it many times in other formulae would be quicker
than having the function repeated in many DATEDIF formulae - if there
were 10,000 dates of birth, for example, wouldn't 30,000 NOW() (or
TODAY() ) functions take longer to calculate than one NOW() function
with 30,000 copies of that cell's contents??

Obviously not, from your timings.

Thanks again,

Pete


Jim Thomlinson wrote:
Purely out of idle curriosity I bench marked both your function and Chips
using both Today and Now. Calculated 100,000 times the functions randomly
took between 15 and 25 seconds to calculate, with no significant differences
between the different methods... The moral of the story is do it how ever you
want...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

So how would you make it faster??? Both Now and Today are volatile so there
is no real advantage to using either one in the context they are being used
and the formula is concatenating 3 calculations together so it requires
getting the current date 3 times. While you could put Now (or Today) in a
seperate cell any gains in speed by only calculating the value once will be
lost in the fact that you now have 3 references to that volatile cell.
--
HTH...

Jim Thomlinson


"Pete_UK" wrote:

I'm not sure why Chip used NOW() instead of TODAY(), and by having it
in the formula 3 times, surely this will take longer to calculate than
once in a cell (I know you are keen on timings in formulae, Epinn).

Pete

Epinn wrote:
From the link:

Calculating A Person's Age

A frequent use of the DATEDIF is to compute someone's age based on the current date and their birthday. The formula below will return someone's exact age based on their birthday in cell A1.


=DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " & DATEDIF(A1,NOW(),"md") & " days"

This will return a string like

33 years, 9 months, 18 days



"Epinn" wrote in message ...
In case you want to do some reading while you wait for an answer ......

http://www.cpearson.com/excel/datedif.htm#Age

Epinn

"jan" wrote in message ...
using excel 2003. try to calculate age from date of birth and another date.




Jim Thomlinson

calculate age from 2 dates in yy,mm,dd format in excel
 
I tested the function in code not by just copying the function down a column.
I think it was 100K but could have been 1M (deleted the code at this point).
Anyways I saw no appreciable difference... did you?
--
HTH...

Jim Thomlinson


"Dave F" wrote:

I'm getting between 3 and 4 seconds to calculate 65000 rows with either of
these two formulas....
--
Brevity is the soul of wit.


"Jim Thomlinson" wrote:

Purely out of idle curriosity I bench marked both your function and Chips
using both Today and Now. Calculated 100,000 times the functions randomly
took between 15 and 25 seconds to calculate, with no significant differences
between the different methods... The moral of the story is do it how ever you
want...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

So how would you make it faster??? Both Now and Today are volatile so there
is no real advantage to using either one in the context they are being used
and the formula is concatenating 3 calculations together so it requires
getting the current date 3 times. While you could put Now (or Today) in a
seperate cell any gains in speed by only calculating the value once will be
lost in the fact that you now have 3 references to that volatile cell.
--
HTH...

Jim Thomlinson


"Pete_UK" wrote:

I'm not sure why Chip used NOW() instead of TODAY(), and by having it
in the formula 3 times, surely this will take longer to calculate than
once in a cell (I know you are keen on timings in formulae, Epinn).

Pete

Epinn wrote:
From the link:

Calculating A Person's Age

A frequent use of the DATEDIF is to compute someone's age based on the current date and their birthday. The formula below will return someone's exact age based on their birthday in cell A1.


=DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " & DATEDIF(A1,NOW(),"md") & " days"

This will return a string like

33 years, 9 months, 18 days



"Epinn" wrote in message ...
In case you want to do some reading while you wait for an answer ......

http://www.cpearson.com/excel/datedif.htm#Age

Epinn

"jan" wrote in message ...
using excel 2003. try to calculate age from date of birth and another date.



Jim Thomlinson

calculate age from 2 dates in yy,mm,dd format in excel
 
There is overhead to check the precidents and dependants of dirtied cells so
any differences will be negated by the overhead of having to check...
--
HTH...

Jim Thomlinson


"Pete_UK" wrote:

Thanks for that, Jim.

I would have thought, intuitively, that for Excel to bring the full
system date and time from wherever it is stored in memory would take
longer than if it only needs to fetch the system date (fewer bytes to
copy), hence my suggestion to use TODAY() rather than NOW(). Obviously,
the overhead to convert those bytes into Excel's floating point format
is greater than the time taken to fetch.

I also felt, instinctively, that by having the function once in a cell
and then referring to it many times in other formulae would be quicker
than having the function repeated in many DATEDIF formulae - if there
were 10,000 dates of birth, for example, wouldn't 30,000 NOW() (or
TODAY() ) functions take longer to calculate than one NOW() function
with 30,000 copies of that cell's contents??

Obviously not, from your timings.

Thanks again,

Pete


Jim Thomlinson wrote:
Purely out of idle curriosity I bench marked both your function and Chips
using both Today and Now. Calculated 100,000 times the functions randomly
took between 15 and 25 seconds to calculate, with no significant differences
between the different methods... The moral of the story is do it how ever you
want...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

So how would you make it faster??? Both Now and Today are volatile so there
is no real advantage to using either one in the context they are being used
and the formula is concatenating 3 calculations together so it requires
getting the current date 3 times. While you could put Now (or Today) in a
seperate cell any gains in speed by only calculating the value once will be
lost in the fact that you now have 3 references to that volatile cell.
--
HTH...

Jim Thomlinson


"Pete_UK" wrote:

I'm not sure why Chip used NOW() instead of TODAY(), and by having it
in the formula 3 times, surely this will take longer to calculate than
once in a cell (I know you are keen on timings in formulae, Epinn).

Pete

Epinn wrote:
From the link:

Calculating A Person's Age

A frequent use of the DATEDIF is to compute someone's age based on the current date and their birthday. The formula below will return someone's exact age based on their birthday in cell A1.


=DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " & DATEDIF(A1,NOW(),"md") & " days"

This will return a string like

33 years, 9 months, 18 days



"Epinn" wrote in message ...
In case you want to do some reading while you wait for an answer ......

http://www.cpearson.com/excel/datedif.htm#Age

Epinn

"jan" wrote in message ...
using excel 2003. try to calculate age from date of birth and another date.





Dave F

calculate age from 2 dates in yy,mm,dd format in excel
 
I copied the function down a column, not via code. Should it be quicker if
using code?

FWIW, I'm using a 3.2 ghz dual-core Xeon processor which probably accounts
for the very short time it took to do the calculations. (Yes, I have a
computer very overpowered for my job. Sort of like going to the grocery in a
Ferrari.)

Dave
--
Brevity is the soul of wit.


"Jim Thomlinson" wrote:

I tested the function in code not by just copying the function down a column.
I think it was 100K but could have been 1M (deleted the code at this point).
Anyways I saw no appreciable difference... did you?
--
HTH...

Jim Thomlinson


"Dave F" wrote:

I'm getting between 3 and 4 seconds to calculate 65000 rows with either of
these two formulas....
--
Brevity is the soul of wit.


"Jim Thomlinson" wrote:

Purely out of idle curriosity I bench marked both your function and Chips
using both Today and Now. Calculated 100,000 times the functions randomly
took between 15 and 25 seconds to calculate, with no significant differences
between the different methods... The moral of the story is do it how ever you
want...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

So how would you make it faster??? Both Now and Today are volatile so there
is no real advantage to using either one in the context they are being used
and the formula is concatenating 3 calculations together so it requires
getting the current date 3 times. While you could put Now (or Today) in a
seperate cell any gains in speed by only calculating the value once will be
lost in the fact that you now have 3 references to that volatile cell.
--
HTH...

Jim Thomlinson


"Pete_UK" wrote:

I'm not sure why Chip used NOW() instead of TODAY(), and by having it
in the formula 3 times, surely this will take longer to calculate than
once in a cell (I know you are keen on timings in formulae, Epinn).

Pete

Epinn wrote:
From the link:

Calculating A Person's Age

A frequent use of the DATEDIF is to compute someone's age based on the current date and their birthday. The formula below will return someone's exact age based on their birthday in cell A1.


=DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " & DATEDIF(A1,NOW(),"md") & " days"

This will return a string like

33 years, 9 months, 18 days



"Epinn" wrote in message ...
In case you want to do some reading while you wait for an answer ......

http://www.cpearson.com/excel/datedif.htm#Age

Epinn

"jan" wrote in message ...
using excel 2003. try to calculate age from date of birth and another date.



Pete_UK

calculate age from 2 dates in yy,mm,dd format in excel
 
Oh well, you learn something new every day, which is what these groups
are all about.

Let's hope that the OP, Jan, got what s/he was looking for.

Pete

Jim Thomlinson wrote:
There is overhead to check the precidents and dependants of dirtied cells so
any differences will be negated by the overhead of having to check...
--
HTH...

Jim Thomlinson


"Pete_UK" wrote:

Thanks for that, Jim.

I would have thought, intuitively, that for Excel to bring the full
system date and time from wherever it is stored in memory would take
longer than if it only needs to fetch the system date (fewer bytes to
copy), hence my suggestion to use TODAY() rather than NOW(). Obviously,
the overhead to convert those bytes into Excel's floating point format
is greater than the time taken to fetch.

I also felt, instinctively, that by having the function once in a cell
and then referring to it many times in other formulae would be quicker
than having the function repeated in many DATEDIF formulae - if there
were 10,000 dates of birth, for example, wouldn't 30,000 NOW() (or
TODAY() ) functions take longer to calculate than one NOW() function
with 30,000 copies of that cell's contents??

Obviously not, from your timings.

Thanks again,

Pete


Jim Thomlinson wrote:
Purely out of idle curriosity I bench marked both your function and Chips
using both Today and Now. Calculated 100,000 times the functions randomly
took between 15 and 25 seconds to calculate, with no significant differences
between the different methods... The moral of the story is do it how ever you
want...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

So how would you make it faster??? Both Now and Today are volatile so there
is no real advantage to using either one in the context they are being used
and the formula is concatenating 3 calculations together so it requires
getting the current date 3 times. While you could put Now (or Today) in a
seperate cell any gains in speed by only calculating the value once will be
lost in the fact that you now have 3 references to that volatile cell.
--
HTH...

Jim Thomlinson


"Pete_UK" wrote:

I'm not sure why Chip used NOW() instead of TODAY(), and by having it
in the formula 3 times, surely this will take longer to calculate than
once in a cell (I know you are keen on timings in formulae, Epinn).

Pete

Epinn wrote:
From the link:

Calculating A Person's Age

A frequent use of the DATEDIF is to compute someone's age based on the current date and their birthday. The formula below will return someone's exact age based on their birthday in cell A1.


=DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " & DATEDIF(A1,NOW(),"md") & " days"

This will return a string like

33 years, 9 months, 18 days



"Epinn" wrote in message ...
In case you want to do some reading while you wait for an answer ......

http://www.cpearson.com/excel/datedif.htm#Age

Epinn

"jan" wrote in message ...
using excel 2003. try to calculate age from date of birth and another date.






Jim Thomlinson

calculate age from 2 dates in yy,mm,dd format in excel
 
There should be no difference between doing it via code or copying down,
except that I can use the Timer in code and get a fairly accurate reading of
the elapsed time. I personally have an old beat up computer that requrires a
good kick every so often to wake up the hamster that lives inside it... That
could account for the time difference... ;-)
--
HTH...

Jim Thomlinson


"Dave F" wrote:

I copied the function down a column, not via code. Should it be quicker if
using code?

FWIW, I'm using a 3.2 ghz dual-core Xeon processor which probably accounts
for the very short time it took to do the calculations. (Yes, I have a
computer very overpowered for my job. Sort of like going to the grocery in a
Ferrari.)

Dave
--
Brevity is the soul of wit.


"Jim Thomlinson" wrote:

I tested the function in code not by just copying the function down a column.
I think it was 100K but could have been 1M (deleted the code at this point).
Anyways I saw no appreciable difference... did you?
--
HTH...

Jim Thomlinson


"Dave F" wrote:

I'm getting between 3 and 4 seconds to calculate 65000 rows with either of
these two formulas....
--
Brevity is the soul of wit.


"Jim Thomlinson" wrote:

Purely out of idle curriosity I bench marked both your function and Chips
using both Today and Now. Calculated 100,000 times the functions randomly
took between 15 and 25 seconds to calculate, with no significant differences
between the different methods... The moral of the story is do it how ever you
want...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

So how would you make it faster??? Both Now and Today are volatile so there
is no real advantage to using either one in the context they are being used
and the formula is concatenating 3 calculations together so it requires
getting the current date 3 times. While you could put Now (or Today) in a
seperate cell any gains in speed by only calculating the value once will be
lost in the fact that you now have 3 references to that volatile cell.
--
HTH...

Jim Thomlinson


"Pete_UK" wrote:

I'm not sure why Chip used NOW() instead of TODAY(), and by having it
in the formula 3 times, surely this will take longer to calculate than
once in a cell (I know you are keen on timings in formulae, Epinn).

Pete

Epinn wrote:
From the link:

Calculating A Person's Age

A frequent use of the DATEDIF is to compute someone's age based on the current date and their birthday. The formula below will return someone's exact age based on their birthday in cell A1.


=DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " & DATEDIF(A1,NOW(),"md") & " days"

This will return a string like

33 years, 9 months, 18 days



"Epinn" wrote in message ...
In case you want to do some reading while you wait for an answer ......

http://www.cpearson.com/excel/datedif.htm#Age

Epinn

"jan" wrote in message ...
using excel 2003. try to calculate age from date of birth and another date.



Epinn

calculate age from 2 dates in yy,mm,dd format in excel
 
Hi,

I love this, the kind of discussion that I enjoy. You are my kind of people - detailed, curious, sense of perfection ......

Pete, I asked the same question: Why NOW( ) and not TODAY( )?

I think I like TODAY( ) even though it is not significantly faster; we don't need the time in NOW( ). Someone may still prefer NOW( ) which has less *keystrokes* than TODAY( ). This is one advantage I can think of. ;)

Jim, thanks for pointing out that both are volatile functions. Also, it is interesting to learn about overhead in checking precedents and dependants of dirtied cells.

Can someone define "dirtied cells" for me please, both in English and in Excel? Thanks.

I am going to start another thread on DATEDIF and you are cordially invited.

Epinn

"Jim Thomlinson" wrote in message ...
There is overhead to check the precidents and dependants of dirtied cells so
any differences will be negated by the overhead of having to check...
--
HTH...

Jim Thomlinson


"Pete_UK" wrote:

Thanks for that, Jim.

I would have thought, intuitively, that for Excel to bring the full
system date and time from wherever it is stored in memory would take
longer than if it only needs to fetch the system date (fewer bytes to
copy), hence my suggestion to use TODAY() rather than NOW(). Obviously,
the overhead to convert those bytes into Excel's floating point format
is greater than the time taken to fetch.

I also felt, instinctively, that by having the function once in a cell
and then referring to it many times in other formulae would be quicker
than having the function repeated in many DATEDIF formulae - if there
were 10,000 dates of birth, for example, wouldn't 30,000 NOW() (or
TODAY() ) functions take longer to calculate than one NOW() function
with 30,000 copies of that cell's contents??

Obviously not, from your timings.

Thanks again,

Pete


Jim Thomlinson wrote:
Purely out of idle curriosity I bench marked both your function and Chips
using both Today and Now. Calculated 100,000 times the functions randomly
took between 15 and 25 seconds to calculate, with no significant differences
between the different methods... The moral of the story is do it how ever you
want...
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

So how would you make it faster??? Both Now and Today are volatile so there
is no real advantage to using either one in the context they are being used
and the formula is concatenating 3 calculations together so it requires
getting the current date 3 times. While you could put Now (or Today) in a
seperate cell any gains in speed by only calculating the value once will be
lost in the fact that you now have 3 references to that volatile cell.
--
HTH...

Jim Thomlinson


"Pete_UK" wrote:

I'm not sure why Chip used NOW() instead of TODAY(), and by having it
in the formula 3 times, surely this will take longer to calculate than
once in a cell (I know you are keen on timings in formulae, Epinn).

Pete

Epinn wrote:
From the link:

Calculating A Person's Age

A frequent use of the DATEDIF is to compute someone's age based on the current date and their birthday. The formula below will return someone's exact age based on their birthday in cell A1.


=DATEDIF(A1,NOW(),"y") & " years, " & DATEDIF(A1,NOW(),"ym") & " months, " & DATEDIF(A1,NOW(),"md") & " days"

This will return a string like

33 years, 9 months, 18 days



"Epinn" wrote in message ...
In case you want to do some reading while you wait for an answer ......

http://www.cpearson.com/excel/datedif.htm#Age

Epinn

"jan" wrote in message ...
using excel 2003. try to calculate age from date of birth and another date.







All times are GMT +1. The time now is 11:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com