If you want a field-based solution, this should work (all braces to be entered by Ctrl+F9):
[blue][tt]{ Quote { Set Year { Date \@ yyyy } }
{ Set Leap { =(MOD(Year,4)=0) - (MOD(Year,100)=0) + (MOD(Year,400)=0) } }
{ Set Month { Date \@ M } }
{ Set EoMonth { =IF(Month=2, 28+Leap, 31-MAX(Month=4,Month=6,Month=9,Month=11)) } }
{ Set Day { ={ Date \@ dd } + 15 } }
{ Set Month { =Month + (Day>EoMonth) } }
{ Set Day { =IF(Day>EoMonth, Day-EoMonth, Day) } }
{ Set Year { =Year + (Month=13) } }
{ Set Month { =IF(Month=13, 1, Month) } }
{ Set NewDate { =(Year*10000) + (Month*100) + Day } }
{ ={ NewDate } \# "0000/00/00" } \@ "dd MMMM yyyy" }
[/tt][/blue]
Member macropod has a document dedicated to this kind of stuff somewhere but I don't have a url to hand (it's on Woody's Lounge, I think the website is called) - and he has a solution for any number of days - the one above only works up to 28 days.
Enjoy,
Tony
--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[