method to sequence

J

Jayne G.

One column has cells which display either a number greater than 1, or 0. I need to have another column where the cells show the same numbers as those greater than one, and for the zeros, a number equal to one plus the last number for the last 0 (e.g. the first time a 0 is located in column A, the cell in column b, same row, = 1, next time 0 is located, column b value = 2, etc.). Thanks very much, Jayne G.
 
F

Frank Kabel

Hi
enter the following in B1
=IF(A1>1,A1,COUNTIF($A$1:$A1,0))
and copy down
 
Top