Time horizon

ks1987

New Member
Joined
Aug 8, 2012
Messages
24
Hi,

I am building a document which requires users to define the time horizon and periodicity requirements, upon which we collect data. This is done through two fields - Start Date and End Date. The period defined will be typically be a 5 year period but can be more or less.

Upon defining this period there is another column 'Time Period' which should automatically be populated with annual periods. For example:-

Start Date - 2/1/2013
End Date - 11/30/2017

Time Period - Feb 2013 - Dec 2013
- Jan 2014 - Dec 2014
- Jan 2015 - Dec 2015
- Jan 2016 - Dec 2016
- Jan 2017 - Nov 2017

I am at odds to figure this problem out. Any help on this is highly appreciated :)
 

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
Hey Thanks for writing!!

I have the Start Date in A1 and the End Date in Cell B1

Now in A2: Apply the following formula:

=IFERROR(IF(YEAR(A1)<YEAR($B$1),IF(ROWS($A$1:A1)=1,TEXT(A1,"MMMM")&" "&YEAR($A$1)+ROWS($A$2:A2)-1,"January "&YEAR($A$1)+ROWS($A$2:A2)-1),""),"")

In B2 : Apply the following formula:

=IFERROR(IF(YEAR(A2)<=YEAR($B$1),TEXT(EDATE(B1,12-MONTH(B1)),"MMMM")&" "&YEAR(A2),""),"")

Now Drag the formulas in A2 and B2 down till you see blank cells.

Hope this helps!!


Thanks/Raj
 
Upvote 0
Please Ignore the previous Post.......


Hey Thanks for writing!!

I have the Start Date in A1 and the End Date in Cell B1

Now in A2: Apply the following formula:

=IFERROR(IF(YEAR(A1)<YEAR($B$1),IF(ROWS($A$1:A1)=1,TEXT(A1,"MMMM")&" "&YEAR($A$1)+ROWS($A$2:A2)-1,"January "&YEAR($A$1)+ROWS($A$2:A2)-1),""),"")
<year($b$1),if(rows($a$1:a1)=1,text(a1,"mmmm")&" "&year($a$1)+rows($a$2:a2)-1,"january="" "&year($a$1)+rows($a$2:a2)-1),""),"")
</year($b$1),if(rows($a$1:a1)=1,text(a1,"mmmm")&">

In B2 : Apply the following formula:

=IFERROR(IF(YEAR(A2)<=YEAR($B$1),TEXT(EDATE(B1,12-MONTH(B1)),"MMMM")&" "&YEAR(A2),""),"")

Now Drag the formulas in A2 and B2 down till you see blank cells.

Hope this helps!!


Thanks/Raj

 
Upvote 0

Forum statistics

Threads
1,215,972
Messages
6,128,029
Members
449,414
Latest member
sameri

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