calculate date by subtracting months

  • Thread starter Thread starter keith0628
  • Start date Start date
K

keith0628

I have a date, (6/11/04 for example) and I want to calculate a new dat
plus or minus a certain number of months from my known date. So th
calculated field would be my known date minus six months. How do I d
this?

Keit
 
Hi Keith!

As far as a general solution is concerned, I'd base this on the
following:

=DATE(YEAR(A1),MONTH(A1)+AddMons,MIN(DAY($A$1),DAY(DATE(YEAR(A1),MONTH(A1)+AddMons+1,0))))

Where AddMons is the number of months to be added or subtracted.


Peter Dorigo, produced a more efficient form:

=MIN(DATE(YEAR(A1),MONTH(A1)+ AddMons +{1,0},DAY($A$1)*{0,1}))

There are simpler formulas but they don't tend to be very robust
because of the problem of not being able to define a month. The
absolute references in both formulas facilitate copy the formula down
or across to generate a series the same number of months apart.
 

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

Similar Threads


Back
Top