I would like to count the number of occurrences of each Item type in column A since the last non-zero value in the Failures column. Each case of a failure effectively resets the counter for that item type.
The desired example result is in bold below. Your input is appreciated.
[TABLE="width: 363"]
<colgroup><col span="3"><col></colgroup><tbody>[TR]
[TD]Item[/TD]
[TD]Irrelevant [/TD]
[TD]Failures[/TD]
[TD]Instances Since Last Failure[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]4[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]6[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]5[/TD]
[TD]0[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]
The desired example result is in bold below. Your input is appreciated.
[TABLE="width: 363"]
<colgroup><col span="3"><col></colgroup><tbody>[TR]
[TD]Item[/TD]
[TD]Irrelevant [/TD]
[TD]Failures[/TD]
[TD]Instances Since Last Failure[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]4[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]2[/TD]
[TD]2[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]B[/TD]
[TD]2[/TD]
[TD]0[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]A[/TD]
[TD]6[/TD]
[TD]0[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]C[/TD]
[TD]5[/TD]
[TD]0[/TD]
[TD]2[/TD]
[/TR]
</tbody>[/TABLE]