Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Date calculation problem

Cell A1 contains a date & I want to calculate to the end of that of that year
period i.e. cell A1 contains 01/04/2007 & I want cell A2 to be 31/03/2008
(ddmmyyyy format). =A1+364 won't do as this does not take into account leap
years. TIA
--
Tony
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Date calculation problem

Tony,
Basically, +1 year and -1 day from the start:

=DATE(YEAR(A1)+1,MONTH(A1),DAY(A1)-1)

NickHK

"TonyL" wrote in message
...
Cell A1 contains a date & I want to calculate to the end of that of that

year
period i.e. cell A1 contains 01/04/2007 & I want cell A2 to be 31/03/2008
(ddmmyyyy format). =A1+364 won't do as this does not take into account

leap
years. TIA
--
Tony



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Date calculation problem

Thanks Nick. That did the trick
--
Tony


"NickHK" wrote:

Tony,
Basically, +1 year and -1 day from the start:

=DATE(YEAR(A1)+1,MONTH(A1),DAY(A1)-1)

NickHK

"TonyL" wrote in message
...
Cell A1 contains a date & I want to calculate to the end of that of that

year
period i.e. cell A1 contains 01/04/2007 & I want cell A2 to be 31/03/2008
(ddmmyyyy format). =A1+364 won't do as this does not take into account

leap
years. TIA
--
Tony




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
Date Calculation problem petedacook Excel Worksheet Functions 3 March 24th 10 02:08 PM
Date Calculation problem wins007 Excel Discussion (Misc queries) 4 June 22nd 09 03:28 PM
Date Calculation Problem Homer Excel Worksheet Functions 9 December 30th 06 08:54 PM
Date Calculation Problem RFrechette Excel Discussion (Misc queries) 4 November 22nd 06 07:31 PM
Date Calculation Problem bperks Excel Programming 2 August 30th 05 07:11 PM


All times are GMT +1. The time now is 10:07 AM.

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

About Us

"It's about Microsoft Excel"