Date Calculation problem

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
 
J

Jacob Skaria

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
 
M

Mike H

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
 
W

wins007

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
 
J

JoeU2004

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 -----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top