If A129 holds a real date (no matter how formatted):
In B129 use =DATE(YEAR(A129)-1,6,1) to get June 1 of previous year
Not sure I understand the rule you are using but to incorporate an IF use
something like
=IF(MONTH(A129)=6, what-you-want-when-month-is-June,
what-you-want-otherwise)
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email
"Sarah (OGI)" wrote in message
...
In cell A129, I have a date value.
In cell B129, I'd like to be able to show the date (in "mmm-yy" format) of
the previous June.
For example:
If A129 shows Aug-08, I'd like B129 to show Jun-08.
If A129 shows Apr-09, I'd like B129 to show Jun-08.
If A129 shows Jul-09, I'd like B129 to show Jun-09.
However, if A129 shows Jun-09, I'd like B129 to show Jun-09.
I'm trying to establish the start and end dates for the financial YTD and
the month provided.
I hope that makes sense. Any ideas?