View Single Post
  #5   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

It's not an old thread Vasant, it's the way Outlook Express does it
other newsreaders won't attach a thread with the same subject to an old
thread

--
Regards,

Peo Sjoblom

(No private emails please)


"Vasant Nanavati" <vasantn AT aol DOT com wrote in message
...
Wow, I didn't realize what an old thread this was. In this situation, you
should really start a new thread.

Also, I assumed that if the first column did not contain a 1, the result
should be 0 (your explanation was not very clear). It's more complicated
if you want to count the leftmost continuous sequence of 1s, regardless of
which column it starts in.

--

Vasant




"Vasant Nanavati" <vasantn AT aol DOT com wrote in message
...
I can't claim much credit for this, but I took two of Harlan Grove's
ingenious solutions and put them together:

=1/MAX(IF(record<1,1/TRANSPOSE(ROW(INDIRECT("1:"&COUNT(record)))),0))-1

entered as an array formula with <Ctrl <Shift <Enter, where "record"
refers to the range being evaluated.

--

Vasant



"yeedao" wrote in
message ...

a row as below:
1, 1, 1, 1, 0.8, 0.9, 0.7, 0.5, 1, 0.8,0.6

I need to count all the continuous 1's from the left. Only the 1st
(from left) 4 1's need to be counted; the 9th 1 should not be counted.
Here the counting results should be 4.

I have several hundred rows like this. Please help to suggest a
formula.

Thanks.


--
yeedao
------------------------------------------------------------------------
yeedao's Profile:
http://www.excelforum.com/member.php...o&userid=26268
View this thread:
http://www.excelforum.com/showthread...hreadid=395619