I have a spreadsheet with columns that are basically booleans, they contain either "Yes" or "No", I want a total count of all the cells in a range that are "Yes".

I imagine this would be done something like summing all the cells in a range where Yes=1 and No=0, but I don't know.

I am looking for a solution that works in Gnumeric, but if you know how to do this in Excel, that may prove useful. I understand that Gnumeric's syntax is very similar to Excel's (more so than OOO's spreadsheet's), so it might just work.

link|improve this question

feedback

1 Answer

up vote 2 down vote accepted

I'm not sure if Gnumeric has the COUNTIF function but since you asked for an Excel solution here it is. Let's say that the cells you are counting are A1 to A99. You would click on another cell where you want to display the count and put in this formula:

=COUNTIF(A1:A99,"YES")

The cell will display the number of YES's. If you want to count the number of NO's it would be simply:

=COUNTIF(A1:A99,"NO")
link|improve this answer
I just verified it. It works in Gnumeric. – Marcin Jan 10 '10 at 5:44
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.