Calculating the term year of rows of dates

mikeniedert

New Member
Joined
Aug 4, 2017
Messages
6
I've been working on this for hours and haven't been able to figure it out. I'm hoping one of you smart people can help.

I created a spreadsheet to help me calculate costs of some of our long term contracts. There is one part of this spreadsheet that is causing me more grief than I thought. On my spreadsheet, I have a number of variables (Start Date, Term Length, etc.) Once I input the Term Length (in cell D3) and the Start Date (in cell D5), it will display the start and end dates for each month of the term. So for example, if I have a contract with a 24-month term (which I input in D3) and it starts on 8/1/2017 (which I input in D5), it will show in Cell B11 a number "1", which means the first month of the contract...and in C11 it show the 8/1/2017 start date, and in D11 it calculates the end date on the first month of the contract (in this example 8/31/2017). The next row shows the information for the second month of the contract (i.e., 2, 9/1/2017, 9/30/2017) and so on until the last row displays (24 in B34, 7/1/2019 in C34, and 7/31/2019 in D34).

What I need is a formula for Column A, which would calculate the term year that each of those rows belong to. So Rows 11-22 would each display a "1" meaning the first year of the contract...and the next 12 rows (rows 23-34) would show "2" for the second year of the contract.

Thank you in advance for your smartness :)
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Welcome to the board.

Put this in A11 and drag down:

=IF(B11="","",INT((ROWS($A$11:$A11)-1)/12)+1)
 
Upvote 0

Forum statistics

Threads
1,216,151
Messages
6,129,162
Members
449,489
Latest member
spvclub

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top