View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default Excel formula to increment the month by 2?

Another way

=MIN(DATE(YEAR(A1),MONTH(A1)+{2,3},DAY(A1)*{1,0}))

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"Roger Govier" wrote in message
...
Hi

=DATE(YEAR(A1),MONTH(A1)+2,DAY(A1)) gives the correct result, most of
the time.

It is incorrect if you had 29, 30 or 31 December in A1, as it would give
dates in March rather than February for all three dates when the result
is a non-leap year, and for the latter 2 when the result is a leap year
The following formula, posted by the late Frank Kabel, corrects this
issue

=DATE(YEAR(A1),MONTH(A1)+2,MIN(DAY(A1),DAY(DATE(YE AR(A1),MONTH(A1)+2+1,0))))

If you have the Analysis Toolpak loaded, ToolsAddinsAnalysis Toolpak,
then you could use the function
=EDATE(A1,2)

--
Regards

Roger Govier


"thirumalairajan" wrote in message
...
Dear friends,

In an excel worksheet, in a cell I am having a day, say for example
03-May-2005 or 03-05-2005, In another cell
I have to increment only the month by 2 i.e from 03-May-2005 to
03-July-2005 using a formula.

What formula should I use?

thanks,
Thirumalairajan.