in column A first value is 0, second is 0, third is 17, fourth is 0 and fifth is 32

in this case , first non zero value is 17. how to calculate it by formula
22 Answers
In cell B1:
=INDEX(A1:A5,MATCH(TRUE,INDEX(A1:A5<>0,),0)) 2Explanation for the above formula:
The inner Index function evaluates the values in the A1:A5 range to either TRUE or FALSE based on the specified condition, that is, not equal to 0. So 17 and 32 evaluate to TRUE, everything else to FALSE. The Match function returns the row number where the first instance of the specified condition TRUE is. This occurs on the 3rd row of the range, so Match evaluates to 3. Finally, the outer Index functions returns the value at row number 3 in the specified A1:A5 range, which is 17.
2