Count cells based on text content (Gnumeric)

4

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.

Jeffrey Aylesworth

Posted 2010-01-10T04:04:33.147

Reputation: 2 170

Answers

3

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")

Marcin

Posted 2010-01-10T04:04:33.147

Reputation: 3 414

I just verified it. It works in Gnumeric. – Marcin – 2010-01-10T05:44:36.983

2

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…]

Skippy le Grand Gourou

Posted 2010-01-10T04:04:33.147

Reputation: 1 349