Hi there,
I have a huge data set (10 units and 5 years data set) that contains for each unit an indicator whether a unit is fully or partially operational or zero if not in operation. I am interested to know the number of blocks (a block is defined as a sequence of fully or partially operational days) and the average operational days within a year.
For the sample data below, Unit 1 has 2 blocks and Unit 2 has 3 blocks. Average Operational days for Unit 1 is (1.5+1.8)/2 = 1.65 days
Is this doable in Excel or Excel VBA ?
Any help in this is much appreciated, thanks in advance.
[TABLE="width: 204"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Unit 1[/TD]
[TD]Unit 2[/TD]
[/TR]
[TR]
[TD="align: right"]1/11/2019[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1/12/2019[/TD]
[TD="align: right"]0.5[/TD]
[TD="align: right"]0.5[/TD]
[/TR]
[TR]
[TD="align: right"]1/13/2019[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]1/14/2019[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1/15/2019[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1/16/2019[/TD]
[TD="align: right"]0.8[/TD]
[TD="align: right"]0.2[/TD]
[/TR]
[TR]
[TD="align: right"]1/17/2019[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2019[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1/19/2019[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
I have a huge data set (10 units and 5 years data set) that contains for each unit an indicator whether a unit is fully or partially operational or zero if not in operation. I am interested to know the number of blocks (a block is defined as a sequence of fully or partially operational days) and the average operational days within a year.
For the sample data below, Unit 1 has 2 blocks and Unit 2 has 3 blocks. Average Operational days for Unit 1 is (1.5+1.8)/2 = 1.65 days
Is this doable in Excel or Excel VBA ?
Any help in this is much appreciated, thanks in advance.
[TABLE="width: 204"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Unit 1[/TD]
[TD]Unit 2[/TD]
[/TR]
[TR]
[TD="align: right"]1/11/2019[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1/12/2019[/TD]
[TD="align: right"]0.5[/TD]
[TD="align: right"]0.5[/TD]
[/TR]
[TR]
[TD="align: right"]1/13/2019[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]1/14/2019[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1/15/2019[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1/16/2019[/TD]
[TD="align: right"]0.8[/TD]
[TD="align: right"]0.2[/TD]
[/TR]
[TR]
[TD="align: right"]1/17/2019[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]1/18/2019[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[/TR]
[TR]
[TD="align: right"]1/19/2019[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]