Steps to do:
1) add new module
2) copy and paste below code
Function FinancialYear(m As Integer, y As Integer) As String
Dim sRetVal As String
If m >= 6 And m <= 12 Then
sRetVal = y & "-" & y + 1
ElseIf m >= 1 And m <= 5 Then
sRetVal = y - 1 & "-" & y
Else
sRetVal = "Over the range!"
End If
FinancialYear = sRetVal
End Function
3) Insert formula in
C
column:
=FinancialYear(A1;B1)
4) Do the 3. step for each cell
5) Done!
Example result:
A B C
1 2013 2012-2013
2 2013 2012-2013
3 2013 2012-2013
4 2013 2012-2013
5 2013 2012-2013
6 2013 2013-2014
7 2013 2013-2014
8 2013 2013-2014
9 2013 2013-2014
10 2013 2013-2014
11 2013 2013-2014
12 2013 2013-2014
13 2013 Over the range!