Clustering date ranges without overlapping. (Timeline bar chart)

emorbidoni

New Member
Joined
Sep 22, 2018
Messages
1
Hi, I'm stuck with this issue, please help!

I have a variable set of dates ranges, and I need to assign each range a number (or label) and avoid overlapped ranges in the same label.
So the numbers (or labels) will be the "Y-Series" for a timeline bar chart.

I need to get the minimum number of "labels" with no overlapped ragnges (3 in the case behind).

Explample of the set:

start date end date

[TABLE="width: 160"]
<colgroup><col width="80" span="2" style="width:60pt"> </colgroup><tbody>[TR]
[TD="class: xl65, width: 80, align: right"]04/2008[/TD]
[TD="class: xl65, width: 80, align: right"]06/2008[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]04/2008[/TD]
[TD="class: xl65, align: right"]05/2008[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]07/2008[/TD]
[TD="class: xl65, align: right"]08/2018[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]07/2008[/TD]
[TD="class: xl65, align: right"]08/2008[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]09/2008[/TD]
[TD="class: xl65, align: right"]07/2014[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]08/2009[/TD]
[TD="class: xl65, align: right"]08/2009[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]08/2011[/TD]
[TD="class: xl65, align: right"]08/2011[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]12/2013[/TD]
[TD="class: xl65, align: right"]12/2013[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]02/2014[/TD]
[TD="class: xl65, align: right"]07/2014[/TD]
[/TR]
[TR]
[TD="class: xl65, align: right"]09/2014[/TD]
[TD="class: xl65, align: right"]10/2014[/TD]
[/TR]
</tbody>[/TABLE]


I need a formula to get the first column:


[TABLE="width: 240"]
<colgroup><col width="80" span="3" style="width:60pt"> </colgroup><tbody>[TR]
[TD="width: 80, align: right"]1[/TD]
[TD="class: xl65, width: 80, align: right"]04/2008[/TD]
[TD="class: xl65, width: 80, align: right"]06/2008[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="class: xl65, align: right"]04/2008[/TD]
[TD="class: xl65, align: right"]05/2008[/TD]
[/TR]
[TR]
[TD="align: right"]1[/TD]
[TD="class: xl65, align: right"]07/2008[/TD]
[TD="class: xl65, align: right"]08/2018[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="class: xl65, align: right"]07/2008[/TD]
[TD="class: xl65, align: right"]08/2008[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="class: xl65, align: right"]09/2008[/TD]
[TD="class: xl65, align: right"]07/2014[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="class: xl65, align: right"]08/2009[/TD]
[TD="class: xl65, align: right"]08/2009[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="class: xl65, align: right"]08/2011[/TD]
[TD="class: xl65, align: right"]08/2011[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="class: xl65, align: right"]12/2013[/TD]
[TD="class: xl65, align: right"]12/2013[/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="class: xl65, align: right"]02/2014[/TD]
[TD="class: xl65, align: right"]07/2014[/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="class: xl65, align: right"]09/2014[/TD]
[TD="class: xl65, align: right"]10/2014[/TD]
[/TR]
</tbody>[/TABLE]


Thanks!
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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