i have a column that shows the peaks of a varying frequency sine wave. It displays the peak x values (using an if statement) but in between the peaks it shows 0 as a results of the false=0 of my if statement. now i would like to get the distance between adjacent peaks by subtracting them but how do i omit the 0's

I cannot simply choose the cell that is non zero as this particular sine graph is dependant on a parameter that i am changing constantly so a particular cell does not always contain this non-zero term.

thanks in advance