Forum Discussion

venomtoxin's avatar
venomtoxin
Copper Contributor
Feb 08, 2020

Counting untill it is False, and continue

Im am completly new to excel and this community, So I say a big HELLO to you all. The question is. How do I count the same numbers untill it is not true.

4.00 1
4.00 2
4.00 3
-12.00 1
-12.00 2
-12.00 3
-12.00 4
4.00 1
4.00 2
-12.00 1
4.00 1
-12.00 1
-12.00 2
4.00 1
-12.00 1
-12.00 2
-12.00 3
4.00 1
-12.00 1
4.00 1

14 Replies

  • Hello,

    You're welcome to this big community. To your question, it is quite unclear.. Kindly re-work the question preferably with sample data.

    Regards
    • venomtoxin's avatar
      venomtoxin
      Copper Contributor

      Abiola1 

      So my data is only this 

      4.00
      4.00
      4.00
      -12.00
      -12.00
      -12.00
      -12.00
      4.00
      4.00
      -12.00
      4.00
      -12.00
      -12.00
      4.00
      -12.00
      -12.00
      -12.00
      4.00
      -12.00
      4.00

       

      • venomtoxin's avatar
        venomtoxin
        Copper Contributor

        venomtoxin 

         

        If anyone doesnt understand please tell me. Im new to this community.

         

        it can be also like this, maybe this is simpler

        4.00   
        4.00
        4.00               3
        -12.00
        -12.00
        -12.00
        -12.00           4
        4.00
        4.00               2
        -12.00           1
        4.00               1
        -12.00
        -12.00           2
        4.00               1
        -12.00
        -12.00
        -12.00           3
        4.00               1
        -12.00           1
        4.00               1

        I really thank for the people to help me with this. Have a great day.

    • venomtoxin's avatar
      venomtoxin
      Copper Contributor

      Abiola1 

       

      well ...  Im gonna type the same thing accually.

       

      If the first cell is A, and the next below is also A, now what I want is to the next column a 2.

      If the third cell is also A, I want a 3 in the next column.

      If the fourth cell is B I want a 1 in the next column. Because it is the first B.

      If the fifth cell is a A again then the next column puts an 1 again. So it count again.

      If the 6 cell is a A again the next column needs a 2.

      a  1

      a  2

      a  3

      b  1

      a  1

      a  2

      b  1

      a  1

      a  2

      b  1

      a  1

      a  2

      b  1

      b  2

      b  3

      a  1

       

      But I have number instead 4.00  and the -12.00.

      • Abiola1's avatar
        Abiola1
        MVP
        Your question is logical related.
        Let say you have A, B, A, C in cells A1 to A4.

        If cell B1, you can write an IF formula thus:
        =IF(A1="A",1,IF(A1="B",2,3)). Click enter and copy down the formula.

        What the above implies is that:
        All cells with A in column A will return 1 in column B.
        All cells with B in column A will return 2 in column B, and so on.

        I guess that is what you're trying to achieve.

Resources