• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

return value if dates are within a range

mpc

New Member
Hi,

Does anyone know what formula shall I use if I need Excel to return a value depending on the content of a different cell.

More precisely, I have in a column some dates in the mmm-yy format and I need the financial year displayed in another cell.

The financial year runs Apr-Mar the following year, and is in the format yy/yy.

i.e. if cell B2 contains Jul-08, I need cell B3 to display 08/09 (or even 08-09, not so important.

Thanks in advance!
 
Code:
=IF(MONTH(B2)>=4,TEXT(B2,"yy")&"/"&TEXT(B2+365,"yy"),TEXT(B2-365,"yy")&"/"&TEXT(B2,"yy"))

Retype the " if you get an error copying
 
Back
Top