Date Calculation problem

  • Thread starter Thread starter wins007
  • Start date Start date
W

wins007

Hi everyone,

I currently have a problem with the calculation of some dates based on an
existing one. I need to calculate a new date based on an original date Col A
to which I need to add a figure which relates to number of months to be added
Col B to produce a new date Col C.

A B C
03/15/2009 2 05/13/2009
04/06/2009 3 04/07/2009
02/28/2009 1 03/28/2009

Your valuable help will be welcomed.

Thanks for your usual support
 
Use the DATE() function. With the date in A1 and number of months in B1 try
the below formula in C1. Copy down as required...

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

If this post helps click Yes
 
Hi,

The formula below will 'probably' do what you want but I don't understand
the logic in your examples. In addition someone will probably point out that
a month isn't an exact amount of time, 28 days to 31 days!!

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

Mike
 
Thanks,

It worked out fine.


Jacob Skaria said:
Use the DATE() function. With the date in A1 and number of months in B1 try
the below formula in C1. Copy down as required...

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

If this post helps click Yes
 
wins007 said:
I need to calculate a new date based on an original date Col A
to which I need to add a figure which relates to number of months
to be added Col B to produce a new date Col C.

Test solutions with 1/31/2009 in A and 1 in B; also with 2/29/2008 in A and
12 in B. My guess is: you would like 2/28/2009 for both. In that case,
use either of the following:

=edate(A1,B1)

=min(date(year(A1),B1+month(A1),day(A1)), date(year(A1),1+B1+month(A1),0)

Copy the format of A1 to C1.

EDATE is preferred. If you get a #NAME error, see the EDATE help page. Use
the latter only if you cannot load the Analysis ToolPak.


----- original message -----
 
Back
Top