0

I have this table in Excel:

enter image description here

I want to count number of zeros and ones in each row and put it in corresponding columns (Number of ones, Number of zeros)

So, for row 3:
There are 3 ones and no zeros.
So in column D (Number of ones) will be 3 and in column E (Number of zeros) will be 0.


How to achieve that using Excel formula in D and E columns?

1 Answer 1

1

In Excel you can use the COUNTIF Function to accomplish This.
In Cell D3 enter

=COUNTIF(A3:C3,1)

This first argument identifies the range A3 to C3... The second argument basically identifies what you want to count, in this case the number of ones.

Likewise to count the number of zeros.... In Cell E3 enter the formula

=COUNTIF(B3:D3,0)

You can then fill down the formula (By double clicking on the corner of the rectangular box) Excel Count

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.