Is there any way for me to add a bunch of cells that only have a 1 in them? If they have a 0 in them, then this should not be added to the total. This should also work if the list is filtered too.
2 Answers
I think that you mean that you want to count the number of cells with 1 in them?
=COUNTIF(A:A,">0")
Will give you a count of the number of cells in column A containing a number greater than zero, change the test to =1
to be more specific.
Yes. Just add them all since 0 will not affect the value?
-
well that is pointless, cos if I do =SUM(F2:F49) it still adds up all of the cells with 0 in them too, I don't want them added!!!– harryJul 18, 2012 at 15:15
-
9@harry If you add 0 to a sum, it won't add anything. Can you clarify your question by maybe including a more specific example?– slhckJul 18, 2012 at 15:17
-
1@pnuts No idea. The OP never came back to clarify, so I've closed that question now.– slhckSep 27, 2012 at 6:56