Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default How to calculate with years....?

How to calculate with years...

IE: Date in Cell(A1) 16/12/1993
Value in B(1)= 12 (Years)

should give date 16/12/2005
-------------------
TIA
Andrew


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,886
Default How to calculate with years....?

Hi

One way
=YEAR(TODAY())-YEAR(A1)
or
=DATEDIF(a1,TODAY(),"y")


--
Regards

Roger Govier


"Andrew" <NoToSPAM@home wrote in message
...
How to calculate with years...

IE: Date in Cell(A1) 16/12/1993
Value in B(1)= 12 (Years)

should give date 16/12/2005
-------------------
TIA
Andrew




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default How to calculate with years....?

These Either return:
Sat-14/Apr/1900
Or
105

Not.... 16/12/2005 ....?

Sorry Roger your Not answering the question.
Thanx for trying though.


"Roger Govier" wrote in message
...
| Hi
|
| One way
| =YEAR(TODAY())-YEAR(A1)
| or
| =DATEDIF(a1,TODAY(),"y")
|
|
| --
| Regards
|
| Roger Govier
|
|
| "Andrew" <NoToSPAM@home wrote in message
| ...
| How to calculate with years...
|
| IE: Date in Cell(A1) 16/12/1993
| Value in B(1)= 12 (Years)
|
| should give date 16/12/2005
| -------------------
| TIA
| Andrew
|
|
|
|


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,886
Default How to calculate with years....?

Hi Andrew

Then you can't have 16/11/1993 in A1
If I have A1 blank then I get 105 in both cases. You are seeing 14/apr/1900
because your cell is formatted as date and 14/04/1900 is 105 days after
01/01/1900. Format the cell as general and you will see 105 in both cases.

Enter 16/11/1993 in A1 and you will see 12 and 11, the answer of 11 being
because we have not yet reached 16/11/2005 so we are still about 6 weeks
short of 12 years.

--
Regards

Roger Govier


"Andrew" <NoToSPAM@home wrote in message
...
These Either return:
Sat-14/Apr/1900
Or
105

Not.... 16/12/2005 ....?

Sorry Roger your Not answering the question.
Thanx for trying though.


"Roger Govier" wrote in message
...
| Hi
|
| One way
| =YEAR(TODAY())-YEAR(A1)
| or
| =DATEDIF(a1,TODAY(),"y")
|
|
| --
| Regards
|
| Roger Govier
|
|
| "Andrew" <NoToSPAM@home wrote in message
| ...
| How to calculate with years...
|
| IE: Date in Cell(A1) 16/12/1993
| Value in B(1)= 12 (Years)
|
| should give date 16/12/2005
| -------------------
| TIA
| Andrew
|
|
|
|




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,886
Default How to calculate with years....?

Hi Andrew

I do most humbly apologise. I must learn to read first and post second!!<bg
Just as I hit the send button, I reread your posting and saw that you wanted
to add 12 years to 16/11/1993, not find the number of years between the two.

=DATE(YEAR(A1),MONTH(A1)+B1,DAY(A1))

--
Regards

Roger Govier


"Roger Govier" wrote in message
...
Hi Andrew

Then you can't have 16/11/1993 in A1
If I have A1 blank then I get 105 in both cases. You are seeing
14/apr/1900 because your cell is formatted as date and 14/04/1900 is 105
days after 01/01/1900. Format the cell as general and you will see 105 in
both cases.

Enter 16/11/1993 in A1 and you will see 12 and 11, the answer of 11 being
because we have not yet reached 16/11/2005 so we are still about 6 weeks
short of 12 years.

--
Regards

Roger Govier


"Andrew" <NoToSPAM@home wrote in message
...
These Either return:
Sat-14/Apr/1900
Or
105

Not.... 16/12/2005 ....?

Sorry Roger your Not answering the question.
Thanx for trying though.


"Roger Govier" wrote in message
...
| Hi
|
| One way
| =YEAR(TODAY())-YEAR(A1)
| or
| =DATEDIF(a1,TODAY(),"y")
|
|
| --
| Regards
|
| Roger Govier
|
|
| "Andrew" <NoToSPAM@home wrote in message
| ...
| How to calculate with years...
|
| IE: Date in Cell(A1) 16/12/1993
| Value in B(1)= 12 (Years)
|
| should give date 16/12/2005
| -------------------
| TIA
| Andrew
|
|
|
|








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,886
Default How to calculate with years....?

Andrew

It's not my day.
That should have read
=DATE(YEAR(A1)+B1,MONTH(A1),DAY(A1))
but I'm sure you realised that.
Now where's that coffee pot??
---
Regards

Roger Govier


"Roger Govier" wrote in message
...
Hi Andrew

I do most humbly apologise. I must learn to read first and post
second!!<bg
Just as I hit the send button, I reread your posting and saw that you
wanted to add 12 years to 16/11/1993, not find the number of years between
the two.

=DATE(YEAR(A1),MONTH(A1)+B1,DAY(A1))

--
Regards

Roger Govier


"Roger Govier" wrote in message
...
Hi Andrew

Then you can't have 16/11/1993 in A1
If I have A1 blank then I get 105 in both cases. You are seeing
14/apr/1900 because your cell is formatted as date and 14/04/1900 is 105
days after 01/01/1900. Format the cell as general and you will see 105 in
both cases.

Enter 16/11/1993 in A1 and you will see 12 and 11, the answer of 11 being
because we have not yet reached 16/11/2005 so we are still about 6 weeks
short of 12 years.

--
Regards

Roger Govier


"Andrew" <NoToSPAM@home wrote in message
...
These Either return:
Sat-14/Apr/1900
Or
105

Not.... 16/12/2005 ....?

Sorry Roger your Not answering the question.
Thanx for trying though.


"Roger Govier" wrote in message
...
| Hi
|
| One way
| =YEAR(TODAY())-YEAR(A1)
| or
| =DATEDIF(a1,TODAY(),"y")
|
|
| --
| Regards
|
| Roger Govier
|
|
| "Andrew" <NoToSPAM@home wrote in message
| ...
| How to calculate with years...
|
| IE: Date in Cell(A1) 16/12/1993
| Value in B(1)= 12 (Years)
|
| should give date 16/12/2005
| -------------------
| TIA
| Andrew
|
|
|
|








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 923
Default How to calculate with years....?

Most flexible way to control all elements of the date.....

=DATE(YEAR(A1)+12,MONTH(A1),DAY(A1))



--
Cheers
Nigel



"Andrew" <NoToSPAM@home wrote in message
...
How to calculate with years...

IE: Date in Cell(A1) 16/12/1993
Value in B(1)= 12 (Years)

should give date 16/12/2005
-------------------
TIA
Andrew




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
Calculate # of years JT Excel Worksheet Functions 6 February 11th 10 02:43 AM
Calculate Number of years Needs Help Excel Worksheet Functions 4 December 7th 07 03:14 PM
Calculate Years of Service Jerry Excel Worksheet Functions 5 February 24th 05 12:27 AM
calculate number of years D L Barnard New Users to Excel 1 January 26th 05 12:19 AM
Calculate months and years Ned Ludd Excel Discussion (Misc queries) 5 December 10th 04 01:57 PM


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