Want to create a VBA function that can return me the financial year end date of any date when I only have the month of financial year as a parameter.For instance: If financial year ends February then a financial year runs from 1/3/???? to 28/2/???? and for a leap year it's 1/3/???? to 29/2/????.Please Login or Register to view this content.
So if I enter any date between 1/3/2006 and 28/2/2007, say 5/12/2006 (dd/mm/yyyy format) and the nMonth parameter as 2 (February) the function must return date as 28/2/2007 (dd/mm/yyyy format). For leap year any date between 1/3/2007 and 29/2/2008 will return 29/2/2008.
I have no idea how to attack this. Any ideas appreciated.
Bookmarks