to see the proper syntax for any function, type the equal sign in a cell, then use function browser on the right. You can filter the function or browse the list.
the syntax for IF:
The IF function returns one of two values, depending on whether a specified expression evaluates to a boolean value of TRUE or FALSE.
IF(if-expression, if-true, if-false)
- if-expression: A logical expression. if-expression can contain anything as long as the expression can be evaluated as a boolean value. If the expression evaluates to a number, 0 is considered to be FALSE, and any other number is considered to be TRUE.
- if-true: The value returned if if-expression is TRUE. if-true can contain any value. If if-trueis omitted (there’s a comma, but no value) and if-expression evaluates to TRUE, IF will return 0.
- if-false: An optional argument specifying the value returned if if-expression is FALSE. if-false can contain any value. If if-false is omitted (there’s a comma, but no value) and if-expression evaluates to FALSE, IF will return 0. If if-false is entirely omitted (there’s no comma after if-true) and if-expressionevaluates to FALSE, IF will return FALSE.
Notes
Either or both if-true and if-false can contain additional IF functions (often called nested IF functions).
there is a function IF(), SUM(), AND() which can all be useful. Ultimately I think you will want to use the function SUMIFS() which will sum values from a range if all conditions are met. look at the syntax for sumifs(). SUMIFS() is SUM IF with more than one condition.
sum if a value is less than a threshold and the value is greater than another threshold.