I have a wordcount column with various numbers but each cell has a formula. So I'd like to count only the cells that have a non-zero number and stop when it hits a zero. A streak in other words.
Daily session count
100
200
400
100
200
=IF(C9<>"",SUM(C9-C8),"")
200
300
=IF(C9<>"",SUM(C9-C8),"")
=IF(C9<>"",SUM(C9-C8),"")
=IF(C9<>"",SUM(C9-C8),"")
=IF(C9<>"",SUM(C9-C8),"")
the longest streak in this example would be 5. What formula could I use for this? I use this for Google Sheets but I need it to work for EXCEL.
=INDEX(COLUMNS(SPLIT(FLATTEN(SPLIT(TRIM(QUERY('Daily Count'!B2:B,,9^9)), " 0 ", )), " ")))
Edit: So the cells with 0 actually have a formula in them (meaning they are not empty) however they are only populated when the adjacent cell is updated with a daily wordcount, and so the daily session count is updated.
If I've missed a day of writing I still add the daily word count which means the daily session count is "0". Again, what I'm looking for is to count the cells in a column, as the longest streak of integers above 0. Thanks :)