Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-24-2018, 03:15 PM
macropod's Avatar
macropod macropod is offline Adding 9 months to month end date. Windows 7 64bit Adding 9 months to month end date. Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,387
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

All you need for the field code is:
{QUOTE
{SET Offset 9}
{SET mm{=MOD({MERGEFIELD Start_Date \@ MM}+MOD(Offset,12)+11,12)+1}}
{SET yy{=INT({MERGEFIELD Start_Date \@ yyyy}+({MERGEFIELD Start_Date \@ M}+Offset-1)/12)}}
{SET dd{=MAX(1,IF((mm=2),28+(MOD(yy,4)=0)+(MOD(yy,400)= 0)-(MOD(yy,100)=0),IF((mm=4)+(mm=6)+(mm=9)+(mm=11)>0, 30,31)))}}
"{dd}-{mm}-{yy}" \@ "d MMMM yyyy""}
where 'Start_Date' is the field name in your data source.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 10-25-2018, 12:20 PM
DanOnline DanOnline is offline Adding 9 months to month end date. Windows 10 Adding 9 months to month end date. Office 2016
Novice
Adding 9 months to month end date.
 
Join Date: Oct 2018
Posts: 7
DanOnline is on a distinguished road
Default

Thank you, I tried this code and it worked as intended.
Reply With Quote
  #3  
Old 01-19-2021, 08:11 AM
lordtgii lordtgii is offline Adding 9 months to month end date. Windows 10 Adding 9 months to month end date. Office 2016
Novice
 
Join Date: Jan 2021
Posts: 1
lordtgii is on a distinguished road
Default

Hi Macropod,
I've been using your beautiful formulae witrhin your tutorial. POroblem i currently face is that using your Calculate a day, date, month and year, using n weeks delay



i am unable to get the result to format into the format whic i require. I assume that this is beacuase the result is treated as text. Do you have a hack for that?
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding 9 months to month end date. Find Date Month charlesdh Excel Programming 11 07-24-2018 06:11 PM
Adding 9 months to month end date. Adding Months TimmiAndrew Excel 2 09-16-2015 10:21 AM
Adding 9 months to month end date. Is it possible to format today's date minus 12 months sarabeck Word 1 07-09-2015 04:53 PM
Adding 9 months to month end date. Counting Number of Months from a static date bremen22 Excel 4 11-25-2013 11:57 AM
Adding 9 months to month end date. Adding months to a Date tsindos Word 4 10-04-2011 11:20 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:45 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft