0
votes

I have a project that is split across 2 fiscal years in excel. I want to get the number of months in 1st fiscal year as well as in the other fiscal year in 2 separate columns. How should I do that.

Eg.

Start Date End date FY16 FY17

Oct-16 Nov-17 ? ?

Like it should return 3 for FY16 & 11 for FY17

1

1 Answers

0
votes

Lets say cell A1 = Oct-16 and cell B1 = Nov-17


Formula for A2:

=SUM(DATEDIF(A1,B1,"m")-(MONTH(B1)-1))


Formula for B2:

=MONTH(B1)


Make sure that the formatting for cells A2 and B2 are set as General.

This will only work if the end year is greater than the start year.