+ Reply to Thread
Results 1 to 101 of 101

countif question

  1. #1
    Registered User
    Join Date
    08-13-2005
    Posts
    4

    Unhappy countif question

    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.

  2. #2
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  3. #3
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  4. #4
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  5. #5
    Registered User
    Join Date
    08-13-2005
    Posts
    4
    Thanks for the help and sorry for not making the problem statement clearer.

    Any number continuously from the left equal to 1 or greater than 1 is a saturation point; The goal is to count how many points are saturated;

    If a number to its left is less than 1 and the number itself is greater than 1, this number is not counted as saturation but as noise.

    Example:
    1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;

    Each number is in a cell; Each row has 20 numbers;

    I thought I can use 1 as an example but it does cause confusion to others and to myself. It is not a integer, it can be 1.001, 1.011, 1.0002, ....;

    I am not sure if that equation still works.

    Thanks again.

  6. #6
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  7. #7
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Assuming that Columns A through T contain your data...

    If there will always be at least one number less than 1, try...

    =MATCH(TRUE,SUBTOTAL(9,OFFSET(A1,0,COLUMN(A1:T1)-COLUMN(A1)))<1,0)-1

    ...confirmed with CONTROL+SHIFT+ENTER, otherwise try...

    =IF(COUNTIF(A1:T1,">=1")<>COLUMNS(A1:T1),MATCH(TRUE,SUBTOTAL(9,OFFSET(A1,0,COLUMN(A1:T1)-COLUMN(A1)))<1,0)-1,COLUMNS(A1:T1))

    ...confirmed with CONTROL+SHIFT+ENTER.

    Hope this helps!

    Quote Originally Posted by yeedao
    Thanks for the help and sorry for not making the problem statement clearer.

    Any number continuously from the left equal to 1 or greater than 1 is a saturation point; The goal is to count how many points are saturated;

    If a number to its left is less than 1 and the number itself is greater than 1, this number is not counted as saturation but as noise.

    Example:
    1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;

    Each number is in a cell; Each row has 20 numbers;

    I thought I can use 1 as an example but it does cause confusion to others and to myself. It is not a integer, it can be 1.001, 1.011, 1.0002, ....;

    I am not sure if that equation still works.

    Thanks again.

  8. #8
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  9. #9
    Registered User
    Join Date
    08-13-2005
    Posts
    4
    Thanks.
    there will always a number less than 1 in a row and I did try the fomula
    "=MATCH(TRUE,SUBTOTAL(9,OFFSET(A1,0,COLUMN(A1:T1)-COLUMN(A1)))<1,0)-1"
    and it did worked for a while, but is not stable. Sounds strange?

    I tried it this morning, it all provided the right output. But after I was trying to retype the fomula, it does not work anymore. Then I re-copied the fomular and it still does not work. Always came out as "#N/A".

    The other fomular did not really work and results in "#N/A".

    Two more questions:
    1. if I need to count numbers greater than 1.2, shall I change the fomular into below?
    "=MATCH(TRUE,SUBTOTAL(9,OFFSET(A1,0,COLUMN(A1:T1)-COLUMN(A1)))<1.2,0)-1"

    2. What do you guys mean by "...confirmed with CONTROL+SHIFT+ENTER"?

    Thanks very much.

  10. #10
    Forum Expert
    Join Date
    06-18-2004
    Location
    Canada
    MS-Off Ver
    Office 2016
    Posts
    1,474
    Quote Originally Posted by yeedao
    1. if I need to count numbers greater than 1.2, shall I change the fomular into below?
    "=MATCH(TRUE,SUBTOTAL(9,OFFSET(A1,0,COLUMN(A1:T1)-COLUMN(A1)))<1.2,0)-1"
    Yes.

    2. What do you guys mean by "...confirmed with CONTROL+SHIFT+ENTER"?
    After typing the formula, instead of hitting just the ENTER, press the CONTROL and SHIFT keys down, then while holding them down, hit the ENTER key. Excel will place braces around the formula which will indicate that you've entered the formula correctly.

  11. #11
    Registered User
    Join Date
    08-13-2005
    Posts
    4
    Thanks a lot, Domenic.
    Everything is now working great.

    Really really appreciate it.

    Yeedao

  12. #12
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  13. #13
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  14. #14
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  15. #15
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  16. #16
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  17. #17
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  18. #18
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  19. #19
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  20. #20
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  21. #21
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  22. #22
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  23. #23
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  24. #24
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  25. #25
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  26. #26
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  27. #27
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  28. #28
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  29. #29
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  30. #30
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  31. #31
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  32. #32
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  33. #33
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  34. #34
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  35. #35
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  36. #36
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  37. #37
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  38. #38
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  39. #39
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  40. #40
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  41. #41
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  42. #42
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  43. #43
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  44. #44
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  45. #45
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  46. #46
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  47. #47
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  48. #48
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  49. #49
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  50. #50
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  51. #51
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  52. #52
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  53. #53
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  54. #54
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  55. #55
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  56. #56
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  57. #57
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  58. #58
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  59. #59
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  60. #60
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  61. #61
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  62. #62
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  63. #63
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  64. #64
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  65. #65
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  66. #66
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  67. #67
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  68. #68
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  69. #69
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  70. #70
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  71. #71
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  72. #72
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  73. #73
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  74. #74
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  75. #75
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  76. #76
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  77. #77
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  78. #78
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  79. #79
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  80. #80
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  81. #81
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  82. #82
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  83. #83
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  84. #84
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  85. #85
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  86. #86
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  87. #87
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  88. #88
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  89. #89
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  90. #90
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  91. #91
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  92. #92
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  93. #93
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  94. #94
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  95. #95
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  96. #96
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




  97. #97
    CLR
    Guest

    Re: countif question

    Please provide a little more info...........

    Is all the data in one cell separated by commas like you show, or is each
    number really in their own cell spanning multi columns?
    Might the string of 1's start somewhere else in the string other than with
    the first character?
    Do the rows all contain 11 numbers like your sample?......If not, what is
    the maximum?


    Vaya con Dios,
    Chuck, CABGx3



    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  98. #98
    Vasant Nanavati
    Guest

    Re: countif question

    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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




  99. #99
    Vasant Nanavati
    Guest

    Re: countif question

    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
    news:[email protected]...
    >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" <[email protected]> wrote in
    > message news:[email protected]...
    >>
    >> 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
    >>

    >
    >




  100. #100
    Peo Sjoblom
    Guest

    Re: countif question

    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
    news:[email protected]...
    > 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
    > news:[email protected]...
    >>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" <[email protected]> wrote in
    >> message news:[email protected]...
    >>>
    >>> 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
    >>>

    >>
    >>

    >
    >



  101. #101
    Vasant Nanavati
    Guest

    Re: countif question

    I don't have time to test right now but replacing "<>" with "<" should work.

    --

    Vasant


    "yeedao" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Thanks for the help and sorry for not making the problem statement
    > clearer.
    >
    > Any number continuously from the left equal to 1 or greater than 1 is a
    > saturation point; The goal is to count how many points are saturated;
    >
    > If a number to its left is less than 1 and the number itself is greater
    > than 1, this number is not counted as saturation but as noise.
    >
    > Example:
    > 1.001, 1.011, 0.98, 0.99,0.8, ..., Count =2; total 20 numbers;
    > 0.99, 08,1.002, 1.003, 0.87, ...., Count =0; total 20 numbers;
    > 1.012, 0.98,0.78,1.02,0.809,...., Count = 1; total 20 numbers;
    >
    > Each number is in a cell; Each row has 20 numbers;
    >
    > I thought I can use 1 as an example but it does cause confusion to
    > others and to myself. It is not a integer, it can be 1.001, 1.011,
    > 1.0002, ....;
    >
    > I am not sure if that equation still works.
    >
    > Thanks again.
    >
    >
    > --
    > yeedao
    > ------------------------------------------------------------------------
    > yeedao's Profile:
    > http://www.excelforum.com/member.php...o&userid=26268
    > View this thread: http://www.excelforum.com/showthread...hreadid=395619
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1