View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
bubba bubba is offline
external usenet poster
 
Posts: 5
Default Counting Zeros in a row until encounter first non-zero value

There will always be a non-zero number that is positive (greater than zero).
There are no text entries and no formula blanks.

I have tried:

=IF(J6=0,MATCH(0.0001,J6:BM6),0)

but the result is not always correct. Sometimes the formula counts
correctly, other times it returns a number equal to the range aka if data is
in columns J:BM it might sometimes returns '56' even though a nonzero number
was encountered before Column BM


"T. Valko" wrote:

Will there *always* be a non-zero entry to find? Are the non-zero numbers
*always* positive numbers greater than 0? Are there any TEXT entries in the
range? Are there any formula blanks in the range?

--
Biff
Microsoft Excel MVP


"Bubba" wrote in message
...
Is there a function, or combination of nested functions to count the
number
of zeros in a row up until the first non-zero valued cell?

For Example

0 0 0 0 0 35 0 50 60
0 0 0 0 0 0 40 10 0 0 30

For the First Row I want the function to return the value 6 and the second
row to return the value '7'

I do not want to know the total number of zeros in a row, I want to know
the
number of zeros in a row until I encounter the first nonzero cell.