Google Sheets: How to count the number of empty rows since the last entry in a column?

You know what, that is a question that seems very easy, but it would be difficult with conventional formulas. Luckily, you can make your own formulas in Google Sheets.

Click Tools> Script Editor and wait for it to appear.

paste the following code that I have written for you,

COUNTROWS function (against, rank) {
range.reverse ();
for (var i = 1; i <range.length; i ++) {
yes[i][0]    == against) return i;
}
returns -1;
}

Now you can use this in your formulas! If your sheet is set up in the same way as your example, this would be the formula

= IF (A2 = 1, COUNTROWS (1, A $ 1: A2), "")

Note: This will only work after the first cell.