Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
thirumalairajan
 
Posts: n/a
Default Excel formula to increment the month by 2?

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.


  #2   Report Post  
Posted to microsoft.public.excel.newusers
Roger Govier
 
Posts: n/a
Default Excel formula to increment the month by 2?

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.



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





  #4   Report Post  
Posted to microsoft.public.excel.newusers
mphell0
 
Posts: n/a
Default Excel formula to increment the month by 2?


=DATE(YEAR(A3),MONTH(A3)+2,DAY(A3))

where A3 contains the date that you want to add 2 months


--
mphell0
------------------------------------------------------------------------
mphell0's Profile: http://www.excelforum.com/member.php...o&userid=30153
View this thread: http://www.excelforum.com/showthread...hreadid=510939

  #5   Report Post  
Posted to microsoft.public.excel.newusers
daddylonglegs
 
Posts: n/a
Default Excel formula to increment the month by 2?


This may depend on what result you want. If your original date (in cell
A1) is
31st December 2005 then

=DATE(YEAR(A1),MONTH(A1)+2,DAY(A1))

will give you a result of 3rd March 2006

whereas

=EDATE(A1,2)

will give you

28th February 2006

note EDATE is part of Analysis ToolPak add-in


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=510939



  #6   Report Post  
Posted to microsoft.public.excel.newusers
daddylonglegs
 
Posts: n/a
Default Excel formula to increment the month by 2?


Bob Phillips Wrote:
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.



Bob, my understanding is that this formula only requires enter,
certainly works OK for me that way


--
daddylonglegs
------------------------------------------------------------------------
daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486
View this thread: http://www.excelforum.com/showthread...hreadid=510940

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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Excel 2003 - Formula result shows as 0:00 Serena Excel Worksheet Functions 4 November 11th 04 10:18 PM


All times are GMT +1. The time now is 02:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"