Q:

How does COUNTA function works (google spreesheet)?

In a google spreadsheet I have the columns A and B populated with some data, then I have this formula to count the values in A if B=1:
=COUNTA(FILTER(A:A;B:B=1))

Problem is that the formula is counting 1 match even if there is no value matching the criteria.
This is the spreadsheet: https://docs.google.com/spreadsheet/ccc?key=0Ak9RViY8FJE5dF9PN3F2ZVFsenk3TG1LZkZjS0d4MHc#gid=0

A:

Thats because the filter results in Error - showing the count 1 which is error...please try
=COUNTA(IFERROR(FILTER(A1:A3,B1:B3=1),""))

