Welcome to the forum!
Try this:
Excel 2016 (Windows) 32 bit
A B C D E F G H I J K 1 0 0 4 5 0 0 2 3 0 0 0 2 3 6
Sheet: Sheet1
Excel 2016 (Windows) 32 bit
B 3 =(LOOKUP(2,1/(1:1>0),COLUMN(1:1))+1)-(MATCH(1,1:1,1)+1)
Sheet: Sheet1
Bookmarks