Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Days between 2 dates

I want to find out how old a person is.
A1 is todays date 2007/2/22 and A2 is their birthday 1975/04/22.Both cells
are in date format.I say A1-A2 the answer appears as a date and when I change
it to a number I get 11629 which is WRONG. It should equal 31.
Pls help!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Days between 2 dates

=DATEDIF(A2,A1,"Y") & " Years, " & DATEDIF(A2,A1,"YM") & " Months, " &
DATEDIF(A2,A1,"MD") & " Days"

Would this do?

"Nicky" wrote:

I want to find out how old a person is.
A1 is todays date 2007/2/22 and A2 is their birthday 1975/04/22.Both cells
are in date format.I say A1-A2 the answer appears as a date and when I change
it to a number I get 11629 which is WRONG. It should equal 31.
Pls help!

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Days between 2 dates

or a bit less detailed

=DATEDIF(A2,A1,"Y")&" Years old"

"Nicky" wrote:

I want to find out how old a person is.
A1 is todays date 2007/2/22 and A2 is their birthday 1975/04/22.Both cells
are in date format.I say A1-A2 the answer appears as a date and when I change
it to a number I get 11629 which is WRONG. It should equal 31.
Pls help!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Days between 2 dates

Unfortunately neither of them have worked.

"Mike" wrote:

or a bit less detailed

=DATEDIF(A2,A1,"Y")&" Years old"

"Nicky" wrote:

I want to find out how old a person is.
A1 is todays date 2007/2/22 and A2 is their birthday 1975/04/22.Both cells
are in date format.I say A1-A2 the answer appears as a date and when I change
it to a number I get 11629 which is WRONG. It should equal 31.
Pls help!

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default Days between 2 dates

They both work perfectly so it may be a format issue in your cells A1 & A2.
Ensure these are both formatted as dates and the cell with these formula in
is formatted as general.

Mike

"Nicky" wrote:

Unfortunately neither of them have worked.

"Mike" wrote:

or a bit less detailed

=DATEDIF(A2,A1,"Y")&" Years old"

"Nicky" wrote:

I want to find out how old a person is.
A1 is todays date 2007/2/22 and A2 is their birthday 1975/04/22.Both cells
are in date format.I say A1-A2 the answer appears as a date and when I change
it to a number I get 11629 which is WRONG. It should equal 31.
Pls help!



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Days between 2 dates

You did get DAYS. Apparently you want years. Use
=DATEDIF(a2,a1,"Y")

--
Don Guillett
SalesAid Software

"Nicky" wrote in message
...
I want to find out how old a person is.
A1 is todays date 2007/2/22 and A2 is their birthday 1975/04/22.Both cells
are in date format.I say A1-A2 the answer appears as a date and when I
change
it to a number I get 11629 which is WRONG. It should equal 31.
Pls help!



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15
Default Days between 2 dates

Ah ha! I accidentally deleted the &" Years old" part of the second suggestion
you gave me and it is working. Thanks!


"Mike" wrote:

They both work perfectly so it may be a format issue in your cells A1 & A2.
Ensure these are both formatted as dates and the cell with these formula in
is formatted as general.

Mike

"Nicky" wrote:

Unfortunately neither of them have worked.

"Mike" wrote:

or a bit less detailed

=DATEDIF(A2,A1,"Y")&" Years old"

"Nicky" wrote:

I want to find out how old a person is.
A1 is todays date 2007/2/22 and A2 is their birthday 1975/04/22.Both cells
are in date format.I say A1-A2 the answer appears as a date and when I change
it to a number I get 11629 which is WRONG. It should equal 31.
Pls help!

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 620
Default Days between 2 dates

Just saying "they haven't worked", in response to the suggestions you
received, doesn't give contributors to the newsgroup much of a clue as to
how to find your error. If you want to get value from the newsgroup, it is
much more useful if you describe the symptoms in a bit more detail.
Although some of the contributors give the impression of being clairvoyant,
most are mere mortals and are helped by some description of the mode of
failure.

Your description of your original problem was OK, but it was a bit strong to
describe the answer as "WRONG". Usually the reason for a "wrong" answer is
that you've asked the wrong question. In your case you'd asked for the
difference between the dates in days, rather than in years, hence the result
you got.
--
David Biddulph

"Nicky" wrote in message
...
Unfortunately neither of them have worked.


"Mike" wrote:

or a bit less detailed

=DATEDIF(A2,A1,"Y")&" Years old"


"Nicky" wrote:

I want to find out how old a person is.
A1 is todays date 2007/2/22 and A2 is their birthday 1975/04/22.Both
cells
are in date format.I say A1-A2 the answer appears as a date and when I
change
it to a number I get 11629 which is WRONG. It should equal 31.
Pls help!



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
Days between 2 dates Linda RQ New Users to Excel 6 November 28th 06 11:41 PM
days and dates msiz Excel Discussion (Misc queries) 6 October 24th 06 12:41 PM
days between 2 dates dpatte601 Excel Worksheet Functions 3 April 17th 06 12:20 AM
Calculating number of days between two dates that fall between two other dates [email protected] Excel Discussion (Misc queries) 5 October 26th 05 06:18 PM
Dates / Days Jeff Excel Discussion (Misc queries) 1 February 14th 05 05:37 PM


All times are GMT +1. The time now is 05:55 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"