![]() |
|
#1
|
||||
|
||||
![]()
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] |
#2
|
|||
|
|||
![]()
Thank you, I tried this code and it worked as intended.
![]() |
#3
|
|||
|
|||
![]()
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? |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
charlesdh | Excel Programming | 11 | 07-24-2018 06:11 PM |
![]() |
TimmiAndrew | Excel | 2 | 09-16-2015 10:21 AM |
![]() |
sarabeck | Word | 1 | 07-09-2015 04:53 PM |
![]() |
bremen22 | Excel | 4 | 11-25-2013 11:57 AM |
![]() |
tsindos | Word | 4 | 10-04-2011 11:20 PM |