Hi All
I hope someone can help me with this problem.
i work for a food manufacturer and am writing a little Excel program to show the correct use by date to be printed on the cartons.
B1=DATE(YEAR(A1),MONTH(A1)+9,DAY(A1)) by using this formula I get the correct answer ie; date in A1 17/01/2011 date in B1 17/10/2011.
A problem arises when there are more days in the current month than the one 9 months ahead
ie; A1 = 30/05/2011 B1 = 01/03/2012
A1 = 30/05/2011 B1 = 02/03/2012
The date needs to stay in the same month and not roll over to the next month.
What I need is A1 = 30/05/2011 B1 = 29/02/2012
A1 = 30/05/2011 B1 = 29/02/2012
Hope you understand and can help
Thanks in advance
Bookmarks