Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Problem with calculating date 6 months into the future

Hello!

I'm trying to get a formula to work which will allow me to calculate a date
half a year into the future. I'm using MONTH(D27)+6, where D21 contains a
date. But if I input, say 31.08.2008 here, I get the output 03.03.2009,
instead of 28.02.2009, which is what I'm looking for (the date format I'm
using is DD.MM.YYYY, by the way).

I also tried with YEAR(D27)+0,5, but that doesn't seem to work at all.
YEAR(D27)+1, on the other hand, seems to work perfectly if the duration is
one year.

What do I need to do to make it correct for half a year?


Best regards,
Torfinn
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Problem with calculating date 6 months into the future

Well, the first thing you need to do is to define *your* rules for what you
think is half a year ahead.

One formula that might deal with your specific example is
=MIN(DATE(YEAR(D27),MONTH(D27)+6,DAY(D27)),DATE(YE AR(D27),MONTH(D27)+7,0))
but *you* need to decide what *you* want.
--
David Biddulph

"Torfinn Brokke" wrote in message
...
Hello!

I'm trying to get a formula to work which will allow me to calculate a
date
half a year into the future. I'm using MONTH(D27)+6, where D21 contains a
date. But if I input, say 31.08.2008 here, I get the output 03.03.2009,
instead of 28.02.2009, which is what I'm looking for (the date format I'm
using is DD.MM.YYYY, by the way).

I also tried with YEAR(D27)+0,5, but that doesn't seem to work at all.
YEAR(D27)+1, on the other hand, seems to work perfectly if the duration is
one year.

What do I need to do to make it correct for half a year?


Best regards,
Torfinn



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default Problem with calculating date 6 months into the future

Thank you! With some slight adaptations, that did the trick!


Best regards,
Torfinn


"David Biddulph" wrote:

Well, the first thing you need to do is to define *your* rules for what you
think is half a year ahead.

One formula that might deal with your specific example is
=MIN(DATE(YEAR(D27),MONTH(D27)+6,DAY(D27)),DATE(YE AR(D27),MONTH(D27)+7,0))
but *you* need to decide what *you* want.
--
David Biddulph

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Problem with calculating date 6 months into the future

Hi,

You may use the EDATE() function

=edate(D21,6)

If you are using Excel 2003/prior versions, then you must install the
Anaysis Toolpak

--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Torfinn Brokke" wrote in message
...
Hello!

I'm trying to get a formula to work which will allow me to calculate a
date
half a year into the future. I'm using MONTH(D27)+6, where D21 contains a
date. But if I input, say 31.08.2008 here, I get the output 03.03.2009,
instead of 28.02.2009, which is what I'm looking for (the date format I'm
using is DD.MM.YYYY, by the way).

I also tried with YEAR(D27)+0,5, but that doesn't seem to work at all.
YEAR(D27)+1, on the other hand, seems to work perfectly if the duration is
one year.

What do I need to do to make it correct for half a year?


Best regards,
Torfinn


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
Calculating a future date ClamBarLover Excel Discussion (Misc queries) 7 June 22nd 07 12:53 AM
problem of calculating years months and days naughtyboy Excel Discussion (Misc queries) 1 August 7th 06 11:22 AM
FORMULA FOR CALCULATING YEARS, DAYS, & MONTHS BETWEEN SEVERAL DATE Sam Excel Discussion (Misc queries) 3 June 28th 06 10:34 PM
Calculating a Date for the Future Niki6 Excel Worksheet Functions 4 September 19th 05 11:49 PM
Calculating days between current date and a date in future NETWORKDAYS() function Faheem Khan Excel Worksheet Functions 2 February 10th 05 07:18 PM


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