werkbook supports 55+ Excel-compatible formula functions. All functions are available in the community edition.
Math
| Function | Syntax | Description |
|---|
| ABS | ABS(number) | Returns the absolute value |
| CEILING | CEILING(number, significance) | Rounds up to the nearest multiple of significance |
| FLOOR | FLOOR(number, significance) | Rounds down to the nearest multiple of significance |
| INT | INT(number) | Rounds down to the nearest integer |
| MOD | MOD(number, divisor) | Returns the remainder after division |
| POWER | POWER(number, power) | Returns the result of a number raised to a power |
| RAND | RAND() | Returns a random number between 0 and 1 |
| RANDBETWEEN | RANDBETWEEN(bottom, top) | Returns a random integer between two values |
| ROUND | ROUND(number, num_digits) | Rounds to a specified number of digits |
| ROUNDDOWN | ROUNDDOWN(number, num_digits) | Rounds toward zero |
| ROUNDUP | ROUNDUP(number, num_digits) | Rounds away from zero |
| SQRT | SQRT(number) | Returns the square root |
Statistics
| Function | Syntax | Description |
|---|
| AVERAGE | AVERAGE(number1, ...) | Returns the arithmetic mean |
| AVERAGEIF | AVERAGEIF(range, criteria, [avg_range]) | Averages cells that meet a condition |
| COUNT | COUNT(value1, ...) | Counts cells containing numbers |
| COUNTA | COUNTA(value1, ...) | Counts non-empty cells |
| COUNTBLANK | COUNTBLANK(range) | Counts empty cells in a range |
| COUNTIF | COUNTIF(range, criteria) | Counts cells that meet a condition |
| COUNTIFS | COUNTIFS(range1, criteria1, ...) | Counts cells meeting multiple conditions |
| LARGE | LARGE(array, k) | Returns the k-th largest value |
| MAX | MAX(number1, ...) | Returns the largest value |
| MIN | MIN(number1, ...) | Returns the smallest value |
| SMALL | SMALL(array, k) | Returns the k-th smallest value |
| SUM | SUM(number1, ...) | Adds all numbers |
| SUMIF | SUMIF(range, criteria, [sum_range]) | Sums cells that meet a condition |
| SUMIFS | SUMIFS(sum_range, range1, criteria1, ...) | Sums cells meeting multiple conditions |
| SUMPRODUCT | SUMPRODUCT(array1, ...) | Returns the sum of element-wise products |
Text
| Function | Syntax | Description |
|---|
| CHOOSE | CHOOSE(index, value1, ...) | Returns a value from a list by index |
| CONCATENATE | CONCATENATE(text1, ...) | Joins text strings |
| CONCAT | CONCAT(text1, ...) | Joins text strings (modern version) |
| FIND | FIND(find_text, within_text, [start]) | Finds text within another string (case-sensitive) |
| LEFT | LEFT(text, [num_chars]) | Returns leftmost characters |
| LEN | LEN(text) | Returns the length of a string |
| LOWER | LOWER(text) | Converts to lowercase |
| MID | MID(text, start, num_chars) | Returns characters from the middle of a string |
| RIGHT | RIGHT(text, [num_chars]) | Returns rightmost characters |
| SUBSTITUTE | SUBSTITUTE(text, old, new, [instance]) | Replaces occurrences of text |
| TEXT | TEXT(value, format_text) | Formats a number as text |
| TRIM | TRIM(text) | Removes extra spaces |
| UPPER | UPPER(text) | Converts to uppercase |
Date
| Function | Syntax | Description |
|---|
| DATE | DATE(year, month, day) | Creates a date serial number |
| DAY | DAY(serial_number) | Returns the day of the month (1–31) |
| MONTH | MONTH(serial_number) | Returns the month (1–12) |
| NOW | NOW() | Returns the current date and time |
| TODAY | TODAY() | Returns the current date |
| YEAR | YEAR(serial_number) | Returns the year |
Logic
| Function | Syntax | Description |
|---|
| AND | AND(logical1, ...) | Returns TRUE if all arguments are true |
| IF | IF(condition, value_if_true, value_if_false) | Conditional evaluation |
| IFERROR | IFERROR(value, value_if_error) | Returns a value if no error, otherwise the fallback |
| NOT | NOT(logical) | Reverses a boolean value |
| OR | OR(logical1, ...) | Returns TRUE if any argument is true |
Lookup
| Function | Syntax | Description |
|---|
| HLOOKUP | HLOOKUP(value, table, row_index, [range_lookup]) | Horizontal lookup in a table |
| INDEX | INDEX(array, row_num, [col_num]) | Returns a value at a given position |
| MATCH | MATCH(value, lookup_array, [match_type]) | Returns the position of a value in a range |
| VLOOKUP | VLOOKUP(value, table, col_index, [range_lookup]) | Vertical lookup in a table |
Info
| Function | Syntax | Description |
|---|
| IFNA | IFNA(value, value_if_na) | Returns a value if no #N/A error, otherwise the fallback |
Using the CLI
List all registered functions from the command line:
wb formula list