Column A Row1 100 Row2 0 Row3 300 Row4 50 Row5 500 Row6 0 Row7 700 Formula in cell B1: =SMALL(A1:A7,COUNTIF(A1:A7,0)+1) Result: 50