excelquestions1
New Member
- Joined
- Sep 26, 2011
- Messages
- 6
Hi,
I have a large list of start and end dates that vary. I need to look up and calculate the number of months in a Fiscal Year period (7/1/11-6/30/12). For example, start-end dates of 7/31/11-8/31/11 should be 1 month. Whereas 7/1/11-7/31/16 should be 12 (maximum for a 12 month fiscal year.) Or the start date could be 4/1/12-6/30/13, which would be 3 months (through 6/30/12). In other words, I can't include months prior to July 2011 or after June 2012.
Also, I would like to calculate half-months i.e. 7/15/11-9/30/11, should be 2.5 months total.
I've started off with (YEAR(B130)-YEAR(A130))*12+MONTH(B130)-MONTH(A130)
and also
DATEDIF(A130,B130,"m")
but am stuck on how to use start/end dates as parameters.
Thanks.
I have a large list of start and end dates that vary. I need to look up and calculate the number of months in a Fiscal Year period (7/1/11-6/30/12). For example, start-end dates of 7/31/11-8/31/11 should be 1 month. Whereas 7/1/11-7/31/16 should be 12 (maximum for a 12 month fiscal year.) Or the start date could be 4/1/12-6/30/13, which would be 3 months (through 6/30/12). In other words, I can't include months prior to July 2011 or after June 2012.
Also, I would like to calculate half-months i.e. 7/15/11-9/30/11, should be 2.5 months total.
I've started off with (YEAR(B130)-YEAR(A130))*12+MONTH(B130)-MONTH(A130)
and also
DATEDIF(A130,B130,"m")
but am stuck on how to use start/end dates as parameters.
Thanks.