Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

2 Answers

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")
share|improve this answer
    
I just verified it. It works in Gnumeric. –  Marcin Jan 10 '10 at 5:44
add comment

In the version I use (1.10.17) the correct syntax is countif(A1:A99;"YES") (semicolon instead of comma).

[Intended as a comment to Marcin's answer, but I cannot comment yet…]

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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