I'm not sure how you want to present this calculation - what do envision this output will look like?
Here is something I put together. It will give you the number of zeros for each occurrence of 1, after the first one. Note, formula for D5 and D6 are different; D6 is copied down. Formula in E5 is just copied straight down.
The result in column D displays how many zeros there were before this current occurrence of 1. Column E is the row number of the current occurrence of 1, within the given data range (so not counting the header row).
Attempting to count more 1s than are in the data range will give an #N/A error.
| A | B | C | D | E |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| One #1 | | | | |
| One #2 | | | | |
| One #3 | | | | |
| One #4 | | | | |
| One #5 | | | | |
| One #6 | | | | |
| One #7 | | | | |
| One #8 | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
<tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]
[TD="align: center"]Value[/TD]
[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: right"]0[/TD]
[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: right"]0[/TD]
[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: right"]0[/TD]
[TD="align: center"]One Row[/TD]
[TD="align: center"]In Row[/TD]
[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]6[/TD]
[TD="bgcolor: #cacaca, align: center"]6[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]14[/TD]
[TD="bgcolor: #cacaca, align: center"]7[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]16[/TD]
[TD="bgcolor: #cacaca, align: center"]8[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]17[/TD]
[TD="bgcolor: #cacaca, align: center"]9[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]19[/TD]
[TD="bgcolor: #cacaca, align: center"]10[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]20[/TD]
[TD="bgcolor: #cacaca, align: center"]11[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]25[/TD]
[TD="bgcolor: #cacaca, align: center"]12[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]28[/TD]
[TD="bgcolor: #cacaca, align: center"]13[/TD]
[TD="align: right"]0[/TD]
[TD="bgcolor: #cacaca, align: center"]14[/TD]
[TD="align: right"]0[/TD]
[TD="bgcolor: #cacaca, align: center"]15[/TD]
[TD="align: right"]1[/TD]
[TD="bgcolor: #cacaca, align: center"]16[/TD]
[TD="align: right"]0[/TD]
[TD="bgcolor: #cacaca, align: center"]17[/TD]
[TD="align: right"]1[/TD]
[TD="bgcolor: #cacaca, align: center"]18[/TD]
[TD="align: right"]1[/TD]
[TD="bgcolor: #cacaca, align: center"]19[/TD]
[TD="align: right"]0[/TD]
[TD="bgcolor: #cacaca, align: center"]20[/TD]
[TD="align: right"]1[/TD]
[TD="bgcolor: #cacaca, align: center"]21[/TD]
[TD="align: right"]1[/TD]
[TD="bgcolor: #cacaca, align: center"]22[/TD]
[TD="align: right"]0[/TD]
[TD="bgcolor: #cacaca, align: center"]23[/TD]
[TD="align: right"]0[/TD]
[TD="bgcolor: #cacaca, align: center"]24[/TD]
[TD="align: right"]0[/TD]
[TD="bgcolor: #cacaca, align: center"]25[/TD]
[TD="align: right"]0[/TD]
[TD="bgcolor: #cacaca, align: center"]26[/TD]
[TD="align: right"]1[/TD]
[TD="bgcolor: #cacaca, align: center"]27[/TD]
[TD="align: right"]0[/TD]
[TD="bgcolor: #cacaca, align: center"]28[/TD]
[TD="align: right"]0[/TD]
[TD="bgcolor: #cacaca, align: center"]29[/TD]
[TD="align: right"]1[/TD]
</tbody>