Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Help in determining age

I have a spread sheet with the following:

# Name DOB Inauguration date Inauguration age
1 George Washington 2/22/1732 4/30/1789


I input in E2 =D2-C2, expecting to have his age in days - but I get
#Value error.

I actually want age in a format showing him to be 57 years, 2 months &
8 days (maybe 57y2m8d - or some other compact value).

What is my error? Anybody have a good formula for getting me year,
month, and day?

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Help in determining age

On Thu, 22 Jan 2009 10:59:16 -0700, Howard Brazee
wrote:

I have a spread sheet with the following:

# Name DOB Inauguration date Inauguration age
1 George Washington 2/22/1732 4/30/1789


I input in E2 =D2-C2, expecting to have his age in days - but I get
#Value error.


I see one problem - all of the dates older than 1900 in this spread
sheet are left justified, all of the newer ones are right justified.
It appears that I need to do something special to handle older dates.

Only when both dates are greater than 1900 do I get a subtraction of
dates.

I just don't know the solution.

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Help in determining age

See:

http://spreadsheetpage.com/index.php...nctions_xdate/


--
Gary''s Student - gsnu2007L


"Howard Brazee" wrote:

On Thu, 22 Jan 2009 10:59:16 -0700, Howard Brazee
wrote:

I have a spread sheet with the following:

# Name DOB Inauguration date Inauguration age
1 George Washington 2/22/1732 4/30/1789


I input in E2 =D2-C2, expecting to have his age in days - but I get
#Value error.


I see one problem - all of the dates older than 1900 in this spread
sheet are left justified, all of the newer ones are right justified.
It appears that I need to do something special to handle older dates.

Only when both dates are greater than 1900 do I get a subtraction of
dates.

I just don't know the solution.

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Help in determining age

Given that the Gregorian Calendar (along with its concept of Leap Years)
wasn't adopted in the United States (actually, Great Britain and its
colonies at the time) until 1752, do you know if the functions you pointed
to handle that or not? I ask because more than a third of the time frame the
OP is asking about took place when Leap Years didn't exist.

--
Rick (MVP - Excel)


"Gary''s Student" wrote in message
...
See:

http://spreadsheetpage.com/index.php...nctions_xdate/


--
Gary''s Student - gsnu2007L


"Howard Brazee" wrote:

On Thu, 22 Jan 2009 10:59:16 -0700, Howard Brazee
wrote:

I have a spread sheet with the following:

# Name DOB Inauguration date Inauguration age
1 George Washington 2/22/1732 4/30/1789


I input in E2 =D2-C2, expecting to have his age in days - but I get
#Value error.


I see one problem - all of the dates older than 1900 in this spread
sheet are left justified, all of the newer ones are right justified.
It appears that I need to do something special to handle older dates.

Only when both dates are greater than 1900 do I get a subtraction of
dates.

I just don't know the solution.

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Help in determining age

An Excellent question! It will require some time to experiment.
--
Gary''s Student - gsnu200828


"Rick Rothstein" wrote:

Given that the Gregorian Calendar (along with its concept of Leap Years)
wasn't adopted in the United States (actually, Great Britain and its
colonies at the time) until 1752, do you know if the functions you pointed
to handle that or not? I ask because more than a third of the time frame the
OP is asking about took place when Leap Years didn't exist.

--
Rick (MVP - Excel)


"Gary''s Student" wrote in message
...
See:

http://spreadsheetpage.com/index.php...nctions_xdate/


--
Gary''s Student - gsnu2007L


"Howard Brazee" wrote:

On Thu, 22 Jan 2009 10:59:16 -0700, Howard Brazee
wrote:

I have a spread sheet with the following:

# Name DOB Inauguration date Inauguration age
1 George Washington 2/22/1732 4/30/1789


I input in E2 =D2-C2, expecting to have his age in days - but I get
#Value error.

I see one problem - all of the dates older than 1900 in this spread
sheet are left justified, all of the newer ones are right justified.
It appears that I need to do something special to handle older dates.

Only when both dates are greater than 1900 do I get a subtraction of
dates.

I just don't know the solution.

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Help in determining age

(along with its concept of Leap Years)

The concept of Leap Years was figured out by the Romans and incorporated
into the Julian Calendar. What they got slightly wrong was it gets out of
sync by almost 3 days every 400 years. This was sorted out by Pope Gregory,
with the new calendar incorporated throughout the world starting in the late
c.16th with the last few countries not until well into the c.20th.

Regards,
Peter T

"Rick Rothstein" wrote in message
...
Given that the Gregorian Calendar (along with its concept of Leap Years)
wasn't adopted in the United States (actually, Great Britain and its
colonies at the time) until 1752, do you know if the functions you pointed
to handle that or not? I ask because more than a third of the time frame
the OP is asking about took place when Leap Years didn't exist.

--
Rick (MVP - Excel)


"Gary''s Student" wrote in
message ...
See:

http://spreadsheetpage.com/index.php...nctions_xdate/


--
Gary''s Student - gsnu2007L


"Howard Brazee" wrote:

On Thu, 22 Jan 2009 10:59:16 -0700, Howard Brazee
wrote:

I have a spread sheet with the following:

# Name DOB Inauguration date Inauguration age
1 George Washington 2/22/1732 4/30/1789


I input in E2 =D2-C2, expecting to have his age in days - but I get
#Value error.

I see one problem - all of the dates older than 1900 in this spread
sheet are left justified, all of the newer ones are right justified.
It appears that I need to do something special to handle older dates.

Only when both dates are greater than 1900 do I get a subtraction of
dates.

I just don't know the solution.

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Help in determining age

You are correct (I should learn not to rely on my memory of things I haven't
thought about for years<g). What I was supposedly thinking about was the
10-day adjustment to the calendar and the new Leap Year calculations that
Pope Gregory came up with... it is that which was adopted by the United
States (colonies) in 1752. My question about whether the referenced link
properly handled this calendar adjustment still stands.

--
Rick (MVP - Excel)


"Peter T" <peter_t@discussions wrote in message
...
(along with its concept of Leap Years)


The concept of Leap Years was figured out by the Romans and incorporated
into the Julian Calendar. What they got slightly wrong was it gets out of
sync by almost 3 days every 400 years. This was sorted out by Pope
Gregory, with the new calendar incorporated throughout the world starting
in the late c.16th with the last few countries not until well into the
c.20th.

Regards,
Peter T

"Rick Rothstein" wrote in message
...
Given that the Gregorian Calendar (along with its concept of Leap Years)
wasn't adopted in the United States (actually, Great Britain and its
colonies at the time) until 1752, do you know if the functions you
pointed to handle that or not? I ask because more than a third of the
time frame the OP is asking about took place when Leap Years didn't
exist.

--
Rick (MVP - Excel)


"Gary''s Student" wrote in
message ...
See:

http://spreadsheetpage.com/index.php...nctions_xdate/


--
Gary''s Student - gsnu2007L


"Howard Brazee" wrote:

On Thu, 22 Jan 2009 10:59:16 -0700, Howard Brazee
wrote:

I have a spread sheet with the following:

# Name DOB Inauguration date Inauguration age
1 George Washington 2/22/1732 4/30/1789


I input in E2 =D2-C2, expecting to have his age in days - but I get
#Value error.

I see one problem - all of the dates older than 1900 in this spread
sheet are left justified, all of the newer ones are right justified.
It appears that I need to do something special to handle older dates.

Only when both dates are greater than 1900 do I get a subtraction of
dates.

I just don't know the solution.

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison





  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Help in determining age

Excel does not handle dates prior to 1900
--
Gary''s Student - gsnu200828


"Howard Brazee" wrote:

I have a spread sheet with the following:

# Name DOB Inauguration date Inauguration age
1 George Washington 2/22/1732 4/30/1789


I input in E2 =D2-C2, expecting to have his age in days - but I get
#Value error.

I actually want age in a format showing him to be 57 years, 2 months &
8 days (maybe 57y2m8d - or some other compact value).

What is my error? Anybody have a good formula for getting me year,
month, and day?

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Help in determining age

Excel doesn't use dates before 1900.

But John Walkenbach has an addin that may help you:
http://j-walk.com/ss/excel/files/xdate.htm

Howard Brazee wrote:

I have a spread sheet with the following:

# Name DOB Inauguration date Inauguration age
1 George Washington 2/22/1732 4/30/1789

I input in E2 =D2-C2, expecting to have his age in days - but I get
#Value error.

I actually want age in a format showing him to be 57 years, 2 months &
8 days (maybe 57y2m8d - or some other compact value).

What is my error? Anybody have a good formula for getting me year,
month, and day?

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison


--

Dave Peterson
  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Help in determining age

On Thu, 22 Jan 2009 12:30:22 -0600, Dave Peterson
wrote:

But John Walkenbach has an addin that may help you:
http://j-walk.com/ss/excel/files/xdate.htm


That looks like my best bet. I have been playing with some other
macros found on the Web.

--
"In no part of the constitution is more wisdom to be found,
than in the clause which confides the question of war or peace
to the legislature, and not to the executive department."

- James Madison


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
Determining the nth Column markb Excel Programming 1 July 28th 08 10:26 PM
Determining if Value In List E.Q. Excel Discussion (Misc queries) 2 April 18th 06 06:05 PM
Determining End Of data bnhcomputing[_2_] Excel Programming 2 September 27th 05 11:25 PM
Determining the last row in a spreadsheet Tom Ogilvy Excel Programming 6 September 17th 03 04:59 PM
Determining Row Number Wes Jester Excel Programming 2 August 26th 03 09:20 PM


All times are GMT +1. The time now is 05:28 AM.

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"