LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 605
Default My discovery on adding months and days to a date!

I found the following on a web site.

************************************************** ************************************************** ****

For example, adding 6 months and 10 days to 8/25/97, in A1 with the formula

=DATE(YEAR(A1),MONTH(A1)+6, DAY(A1)+10)

gives 3/7/98.

************************************************** ************************************************** *****

I insert the formula and 8/25/97 in a worksheet and sure enough Excel gives me 3/7/98. I understand that Excel adds the months *first* before it adds the days. Evaluate formula confirms this.

However, I get a different result when I break up the above process into two and change the sequence of addition. This is what I have done.

I enter 8/25/97 into A1. Then I enter into B1 this formula

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

Please note that I only add 10 days. The result in B1 is 9/4/1997.

Then in C1, I enter

=DATE(YEAR(B1),MONTH(B1)+6,DAY(B1))

After adding six months, I get 3/4/1998 in C1.

As you will have noted, this result is different from 3/7/98 as stated above. In both Excel processes, I add six months and 10 days to 8/25/97. But the results are so different depending on the sequence of addition. (I do know that if I split the process into two and add months *first* and then days, I'll get 3/7/1998).

If I am not using Excel, I am inclined to add days before I add months as I want to go with the smallest unit first. Is it just me? What is the habit of others? In an office environment, if someone wants to add six months and 10 days, which of the above result is really expected?

Comments welcome.

Epinn


 
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
CAn any one solve this problem of days months and years.its urgent plzzzzzzzzzzzz naughtyboy Excel Discussion (Misc queries) 3 August 19th 06 05:45 PM
Adding 6 months to any given date hoyt New Users to Excel 7 July 9th 06 11:14 AM
HOW DO I CALCULATE THE YEARS MONTHS AND DAYS BETWEEN SEVERAL DATE Susan Excel Discussion (Misc queries) 1 June 29th 06 02:27 PM
Working days left in the month compared to previous months qwopzxnm Excel Worksheet Functions 8 October 24th 05 08:00 PM
Why "datedif" function results sometimes negative numbers? Ambrosiy Excel Worksheet Functions 1 July 8th 05 11:29 AM


All times are GMT +1. The time now is 11:56 PM.

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

About Us

"It's about Microsoft Excel"