Show a date based on another date

S

Sarah (OGI)

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?
 
B

Bernard Liengme

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top