Conditional sum

 1999-08-14    Sum    0    64

With the worksheetfunction SUMIF() it's possible to return the sum of all cells in a given range that fulfills a given criteria.

The function =SUMIF(A1:A100,">1000") will return the sum of all values in the range A1:A100 that is greater than 1000.

The function =SUMIF(A1:A100,">1000",B1:B100) will return the sum of all values in the range B1:B100 that has an adjacent cell in the range A1:A100 that is greater than 1000.

You can also use the COUNTIF()-function in a similar way to perform a conditional count.