I’m trying to get Google Sheets to tell me how many rows it has been since the last “1” was present in column A (see example table below). How do I get Google Sheets to output column B?

An alternative way of looking at this is to count the number of zeros/blanks in between the 1’s in column A (then +1 to account for the row with the second 1) and print that number in Column B. How can I do this?

`Data # rows since last "1" 1 1 1 0 1 2 0 0 0 0 1 5 1 1 `