LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Graham
 
Posts: n/a
Default Adding months to dates should account for 28-30-31 day months

When working with the DATE function to subtract one month from a given dat,
using the following string:
=TEXT(DATE(YEAR(Report_Date),MONTH(Report_Date)-1,DAY(Report_Date)),"mmm yy")
& " YTD Actual", the formula doesn't fully take account of different length
months.

If I use the date 31/10/06 the prior month returned is still October. To
correct this I have to use 30/10/6 instead, then check each instance of the
formula to ensure all report headings are correct.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...et.f unctions
 
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
Adding 6 Months to a Date Excel User Excel Worksheet Functions 8 January 25th 07 12:16 AM
Counting dates for a the present month but not future months BrianInCalifornia Excel Worksheet Functions 3 December 7th 05 02:00 AM
Calculating Dates in Terms of Months Jessica Excel Worksheet Functions 4 September 20th 05 06:35 PM
months between 2 dates!!! speary Excel Discussion (Misc queries) 1 August 19th 05 03:22 PM
How do I display months and years between two dates JSmith Excel Discussion (Misc queries) 1 November 30th 04 04:41 PM


All times are GMT +1. The time now is 01:49 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"