sumif
Sum cells in a range that meet a criterion.
Syntax
Section titled “Syntax”v = sumif(range, criteria, sum_range)Description
Section titled “Description”Sums cells in sum_range (or range if omitted) where the corresponding range cell matches criteria. criteria is a string like '>10', 'apple*', etc.
Example
Section titled “Example”sumif(A1:A100, '>0') % sum of positive values