Logical & Lookup functions
Reference for all 22 Logical & Lookup functions in Kazi Sheets, with syntax and examples.
Make decisions with IF and friends, and find values in tables. Kazi Sheets has 22 Logical & Lookup functions. Type = in a cell, start typing a name, and Kazi suggests it.
| Function | What it does |
|---|---|
| AVERAGEIF | Averages values in a range that meet a condition. |
| CHOOSE | Returns a value from a list based on index position. |
| COUNTIF | Counts cells in a range that meet a condition. |
| COUNTIFS | Counts cells matching multiple criteria. |
| HLOOKUP | Horizontal lookup across the first row of a range. |
| IF | Returns one value if a condition is true and another if false. |
| IFERROR | Returns value if not error, otherwise returns fallback. |
| IFS | Evaluates multiple conditions and returns first true value. |
| INDEX | Returns the value of a cell at a given coordinate in a range. |
| INDIRECT | Returns the cell reference specified by a text string. |
| ISBLANK | Returns TRUE if the referenced cell is empty. |
| ISNUMBER | Returns TRUE if the value is numeric. |
| ISTEXT | Returns TRUE if the value is text. |
| MATCH | Returns the relative position of an item in a range. |
| MAXIFS | Returns maximum value among cells specified by conditions. |
| MINIFS | Returns minimum value among cells specified by conditions. |
| OFFSET | Returns a cell reference offset by a specified number of rows and columns. |
| SUMIF | Sums values in a range that meet a condition. |
| SUMIFS | Sums cells matching multiple criteria. |
| SWITCH | Evaluates expression against a list of values and returns corresponding result. |
| VLOOKUP | Vertical lookup across the first column of a range. |
| XLOOKUP | Modern lookup returning corresponding values across ranges. |
AVERAGEIF
Averages values in a range that meet a condition.
Syntax
AVERAGEIF(range, criterion, [average_range])Example
=AVERAGEIF(B2:B10, ">0")CHOOSE
Returns a value from a list based on index position.
Syntax
CHOOSE(index, val1, val2, ...)Example
=CHOOSE(2, "Bronze", "Silver", "Gold")COUNTIF
Counts cells in a range that meet a condition.
Syntax
COUNTIF(range, criterion)Example
=COUNTIF(B2:D4, ">20000")COUNTIFS
Counts cells matching multiple criteria.
Syntax
COUNTIFS(crit_range1, crit1, ...)Example
=COUNTIFS(A2:A10, "PAID", C2:C10, "MoMo")HLOOKUP
Horizontal lookup across the first row of a range.
Syntax
HLOOKUP(search_key, range, row_index)Example
=HLOOKUP("Q3", A1:Z5, 2)IF
Returns one value if a condition is true and another if false.
Syntax
IF(condition, value_if_true, value_if_false)Example
=IF(E4>50000, "Profitable", "Review")IFERROR
Returns value if not error, otherwise returns fallback.
Syntax
IFERROR(value, value_if_error)Example
=IFERROR(B2/C2, 0)IFS
Evaluates multiple conditions and returns first true value.
Syntax
IFS(cond1, val1, [cond2, val2], ...)Example
=IFS(B2>90, "A", B2>80, "B", B2>70, "C")INDEX
Returns the value of a cell at a given coordinate in a range.
Syntax
INDEX(range, row_num, [col_num])Example
=INDEX(B2:D10, 3, 2)INDIRECT
Returns the cell reference specified by a text string.
Syntax
INDIRECT(cell_reference_as_text)Example
=INDIRECT("B" & 4)ISBLANK
Returns TRUE if the referenced cell is empty.
Syntax
ISBLANK(value)Example
=ISBLANK(C2)ISNUMBER
Returns TRUE if the value is numeric.
Syntax
ISNUMBER(value)Example
=ISNUMBER(B2)ISTEXT
Returns TRUE if the value is text.
Syntax
ISTEXT(value)Example
=ISTEXT(A2)MATCH
Returns the relative position of an item in a range.
Syntax
MATCH(search_key, range)Example
=MATCH("Q3", A1:A10)MAXIFS
Returns maximum value among cells specified by conditions.
Syntax
MAXIFS(max_range, crit_range1, crit1, ...)Example
=MAXIFS(B2:B10, A2:A10, "Q1")MINIFS
Returns minimum value among cells specified by conditions.
Syntax
MINIFS(min_range, crit_range1, crit1, ...)Example
=MINIFS(B2:B10, A2:A10, "Q1")OFFSET
Returns a cell reference offset by a specified number of rows and columns.
Syntax
OFFSET(reference, rows, cols)Example
=OFFSET(A1, 2, 3)SUMIF
Sums values in a range that meet a condition.
Syntax
SUMIF(range, criterion, [sum_range])Example
=SUMIF(B2:D2, ">35000")SUMIFS
Sums cells matching multiple criteria.
Syntax
SUMIFS(sum_range, crit_range1, crit1, ...)Example
=SUMIFS(B2:B10, A2:A10, "PAID", C2:C10, "MoMo")SWITCH
Evaluates expression against a list of values and returns corresponding result.
Syntax
SWITCH(expression, val1, result1, [default])Example
=SWITCH(A2, "US", "Dollar", "UG", "UGX", "Other")VLOOKUP
Vertical lookup across the first column of a range.
Syntax
VLOOKUP(search_key, range, col_index)Example
=VLOOKUP("Product A", A1:E4, 3)XLOOKUP
Modern lookup returning corresponding values across ranges.
Syntax
XLOOKUP(search_key, lookup_range, return_range, [if_not_found])Example
=XLOOKUP(A2, A1:A10, B1:B10, "Not Found")