Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Frank Malone
 
Posts: n/a
Default Datevalue if born before 1930

I'm using =(year(now()-datevalue(d4))-1900)
I enter DOB as text and excel finds age of person if born 1930 or after
1930. But if year of birth is 1929 or earlier get error #num! So is their
some way to get around this problem.


  #2   Report Post  
Dave R.
 
Posts: n/a
Default

Hmm.. that worked for me.

Here's another couple of approaches, see if they work for you.

=DATEDIF(D4,NOW(),"y")

which works with D4 as text or as a date.


or more similar to your original formula with D4 as text..

=YEAR(NOW())-YEAR(DATEVALUE(D4))



"Frank Malone" wrote in message
...
I'm using =(year(now()-datevalue(d4))-1900)
I enter DOB as text and excel finds age of person if born 1930 or after
1930. But if year of birth is 1929 or earlier get error #num! So is their
some way to get around this problem.




  #3   Report Post  
Myrna Larson
 
Posts: n/a
Default

Just to point out the difference in your two suggestions:

DATEDIF will give the age in years as of the 2nd date.

Subtraction will give the age the person will attain in the current year,
whether the birthday has occurred or not.

Example: A child was born on Mar 21, 2000, and the current date is Jan 12,
2005. Subtracting years gives 5. I expect most people would want a result of
4. DATEDIF will give 4.

On Wed, 12 Jan 2005 09:01:58 -0800, "Dave R." wrote:

Hmm.. that worked for me.

Here's another couple of approaches, see if they work for you.

=DATEDIF(D4,NOW(),"y")

which works with D4 as text or as a date.


or more similar to your original formula with D4 as text..

=YEAR(NOW())-YEAR(DATEVALUE(D4))



"Frank Malone" wrote in message
...
I'm using =(year(now()-datevalue(d4))-1900)
I enter DOB as text and excel finds age of person if born 1930 or after
1930. But if year of birth is 1929 or earlier get error #num! So is their
some way to get around this problem.




  #4   Report Post  
Frank Malone
 
Posts: n/a
Default

I just found out if I enter 30 for 1930 all ok, if I enter 29 for 1929 get
error. But if I enter 1929 get correct age.

"Myrna Larson" wrote in message
...
Just to point out the difference in your two suggestions:

DATEDIF will give the age in years as of the 2nd date.

Subtraction will give the age the person will attain in the current year,
whether the birthday has occurred or not.

Example: A child was born on Mar 21, 2000, and the current date is Jan 12,
2005. Subtracting years gives 5. I expect most people would want a result
of
4. DATEDIF will give 4.

On Wed, 12 Jan 2005 09:01:58 -0800, "Dave R." wrote:

Hmm.. that worked for me.

Here's another couple of approaches, see if they work for you.

=DATEDIF(D4,NOW(),"y")

which works with D4 as text or as a date.


or more similar to your original formula with D4 as text..

=YEAR(NOW())-YEAR(DATEVALUE(D4))



"Frank Malone" wrote in message
.. .
I'm using =(year(now()-datevalue(d4))-1900)
I enter DOB as text and excel finds age of person if born 1930 or after
1930. But if year of birth is 1929 or earlier get error #num! So is
their
some way to get around this problem.






  #5   Report Post  
Myrna Larson
 
Posts: n/a
Default

That has to do with your Windows Regional settings, as to when a 2-digit year
is interpreted as 20th century and when 21st century.

On Wed, 12 Jan 2005 13:45:01 -0500, "Frank Malone"
wrote:

I just found out if I enter 30 for 1930 all ok, if I enter 29 for 1929 get
error. But if I enter 1929 get correct age.

"Myrna Larson" wrote in message
.. .
Just to point out the difference in your two suggestions:

DATEDIF will give the age in years as of the 2nd date.

Subtraction will give the age the person will attain in the current year,
whether the birthday has occurred or not.

Example: A child was born on Mar 21, 2000, and the current date is Jan 12,
2005. Subtracting years gives 5. I expect most people would want a result
of
4. DATEDIF will give 4.

On Wed, 12 Jan 2005 09:01:58 -0800, "Dave R." wrote:

Hmm.. that worked for me.

Here's another couple of approaches, see if they work for you.

=DATEDIF(D4,NOW(),"y")

which works with D4 as text or as a date.


or more similar to your original formula with D4 as text..

=YEAR(NOW())-YEAR(DATEVALUE(D4))



"Frank Malone" wrote in message
. ..
I'm using =(year(now()-datevalue(d4))-1900)
I enter DOB as text and excel finds age of person if born 1930 or after
1930. But if year of birth is 1929 or earlier get error #num! So is
their
some way to get around this problem.








  #6   Report Post  
Gord Dibben
 
Posts: n/a
Default

Myrna

So I thought also.

I played with mine and changed to 1940 - 2040.

Closed Excel, reopened and it still crapped out at any 2-digit year before
1930

Changed again to 1920 - 2020 and it continues to give #NUM error.

It is internal to Excel. 1930 seems to be the limit.

I seem to remember that Excel 97 came out with that limit.


Gord


On Wed, 12 Jan 2005 17:55:28 -0600, Myrna Larson
wrote:

That has to do with your Windows Regional settings, as to when a 2-digit year
is interpreted as 20th century and when 21st century.

On Wed, 12 Jan 2005 13:45:01 -0500, "Frank Malone"
wrote:

I just found out if I enter 30 for 1930 all ok, if I enter 29 for 1929 get
error. But if I enter 1929 get correct age.

"Myrna Larson" wrote in message
. ..
Just to point out the difference in your two suggestions:

DATEDIF will give the age in years as of the 2nd date.

Subtraction will give the age the person will attain in the current year,
whether the birthday has occurred or not.

Example: A child was born on Mar 21, 2000, and the current date is Jan 12,
2005. Subtracting years gives 5. I expect most people would want a result
of
4. DATEDIF will give 4.

On Wed, 12 Jan 2005 09:01:58 -0800, "Dave R." wrote:

Hmm.. that worked for me.

Here's another couple of approaches, see if they work for you.

=DATEDIF(D4,NOW(),"y")

which works with D4 as text or as a date.


or more similar to your original formula with D4 as text..

=YEAR(NOW())-YEAR(DATEVALUE(D4))



"Frank Malone" wrote in message
.. .
I'm using =(year(now()-datevalue(d4))-1900)
I enter DOB as text and excel finds age of person if born 1930 or after
1930. But if year of birth is 1929 or earlier get error #num! So is
their
some way to get around this problem.






  #7   Report Post  
Gord Dibben
 
Posts: n/a
Default

From Excel 97 Help.....

Note When you enter a date in Microsoft Excel 97 and you enter only two
digits for the year, Microsoft Excel enters the year as follows:

· The years 2000 through 2029 if you type 00 through 29 for the year.
For example, if you type 5/28/19, Microsoft Excel assumes the date is May 28,
2019.
· The years 1930 through 1999 if you type 30 through 99 for the year.
For example, if you type 5/28/91, Microsoft Excel assumes the date is May 28,
1991.


Gord

On Wed, 12 Jan 2005 18:04:27 -0800, Gord Dibben <gorddibbATshawDOTca wrote:

Myrna

So I thought also.

I played with mine and changed to 1940 - 2040.

Closed Excel, reopened and it still crapped out at any 2-digit year before
1930

Changed again to 1920 - 2020 and it continues to give #NUM error.

It is internal to Excel. 1930 seems to be the limit.

I seem to remember that Excel 97 came out with that limit.


Gord


On Wed, 12 Jan 2005 17:55:28 -0600, Myrna Larson
wrote:

That has to do with your Windows Regional settings, as to when a 2-digit year
is interpreted as 20th century and when 21st century.

On Wed, 12 Jan 2005 13:45:01 -0500, "Frank Malone"
wrote:

I just found out if I enter 30 for 1930 all ok, if I enter 29 for 1929 get
error. But if I enter 1929 get correct age.

"Myrna Larson" wrote in message
...
Just to point out the difference in your two suggestions:

DATEDIF will give the age in years as of the 2nd date.

Subtraction will give the age the person will attain in the current year,
whether the birthday has occurred or not.

Example: A child was born on Mar 21, 2000, and the current date is Jan 12,
2005. Subtracting years gives 5. I expect most people would want a result
of
4. DATEDIF will give 4.

On Wed, 12 Jan 2005 09:01:58 -0800, "Dave R." wrote:

Hmm.. that worked for me.

Here's another couple of approaches, see if they work for you.

=DATEDIF(D4,NOW(),"y")

which works with D4 as text or as a date.


or more similar to your original formula with D4 as text..

=YEAR(NOW())-YEAR(DATEVALUE(D4))



"Frank Malone" wrote in message
. ..
I'm using =(year(now()-datevalue(d4))-1900)
I enter DOB as text and excel finds age of person if born 1930 or after
1930. But if year of birth is 1929 or earlier get error #num! So is
their
some way to get around this problem.






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
DATEVALUE OF CURRENT DATE JONBOYMFLY Excel Worksheet Functions 5 December 29th 04 05:55 PM


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

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

About Us

"It's about Microsoft Excel"