Documentation

Function reference

Signatures, behavior notes, and executable examples from the shipped formula definitions.

This reference is generated from the function registrations shipped with Hugtab. The same names, descriptions, and signatures supply formula autocomplete. Examples are tested with the real formula engine.

Start each expression with =. Optional arguments appear in square brackets in signatures; do not type those brackets. Example cell values belong on the current sheet; put the example formula in an unused cell outside its input range.

Third-party desktop plugins may add functions that are not part of this shipped reference. See writing formulas for references, operators, and errors.

ABS

ABS(value)

Absolute value

Numeric text is accepted. Blanks become 0; TRUE becomes 1 and FALSE becomes 0. Nonnumeric text returns #VALUE!.

=ABS(-7)

Result: 7

AND

AND(logical1, [logical2, …])

Logical AND

Uses truth values: zero, blanks, and empty text are false; nonempty text is true.

=AND(TRUE, 2>1)

Result: TRUE

ARRAYFORMULA

ARRAYFORMULA(range)

Return a bounded range as an array result

Accepts one same-sheet cell or rectangular range reference on ordinary sheets. Results spill up to the 10,000-cell limit; blockers return #REF!. Imported-sheet output, whole-column references, and other array functions are unsupported.

Enter these values first:

A1: 7
=ARRAYFORMULA(A1)

Result: 7

AVERAGE

AVERAGE(value1, [value2, …])

Arithmetic mean

Cell and range references ignore text, booleans, and blanks; referenced formula errors propagate. Numeric-looking text and booleans supplied directly count; direct nonnumeric text returns #VALUE!. With no numeric values, returns #DIV/0!.

=AVERAGE(10, 20)

Result: 15

CONCAT

CONCAT(value1, [value2, …])

Concatenate values

Joins values or ranges without a separator. Blanks become empty text; booleans become TRUE or FALSE.

=CONCAT("Hello", " ", "world")

Result: "Hello world"

COUNT

COUNT(value1, [value2, …])

Count numeric values

Cell and range references count numeric cells only and ignore formula errors. Numeric-looking text and booleans supplied directly count as numbers; blanks and text are ignored.

=COUNT(7, "12", TRUE, "note")

Result: 3

COUNTA

COUNTA(value1, [value2, …])

Count non-empty values

Counts numbers, booleans, text, and zero-length strings. Blank cells are not counted.

Enter these values first:

A1: 0
A2: =FALSE
A3: =""
A4: (leave blank)
=COUNTA(A1:A4)

Result: 3

COUNTIF

COUNTIF(criteria_range, criterion)

Conditional count for one criterion

Matches text without case sensitivity. Criteria support =, <>, <, <=, >, >= and * / ? wildcards; prefix a wildcard or tilde with ~ to match it literally. A blank criterion counts blank cells.

Enter these values first:

A1: Paid
A2: Pending
A3: Paid
=COUNTIF(A1:A3, "Paid")

Result: 2

COUNTIFS

COUNTIFS(criteria_range1, criterion1, [criteria_range2, criterion2, …])

Conditional count for multiple criteria

A row counts only when all criteria match. Text criteria are case-insensitive; criteria ranges must have matching dimensions.

Enter these values first:

A1: Paid
A2: Pending
A3: Paid
B1: 10
B2: 20
B3: 30
=COUNTIFS(A1:A3, "paid", B1:B3, ">0")

Result: 2

DATE

DATE(year, month, day)

Create a date serial from year, month, and day

Months and days overflow into adjacent years/months; decimal components are truncated. Years 0–1899 are offset by 1900. Years outside 0–9999 return #NUM!. Dates before serial 0 are not returned.

=DATE(2024,2,29)

Result: 45351

DAY

DAY(date)

Return the day of a date serial's month

Accepts a nonnegative date serial or ISO date text; ignores any time fraction.

=DAY(DATE(2024,2,29))

Result: 29

DOUBLE

DOUBLE(value)

Double a value

An example extension shipped with Hugtab. Use a numeric value to multiply it by two.

Enter these values first:

A1: 7
=DOUBLE(A1)

Result: 14

FIND

FIND(search_for, text_to_search, [starting_at])

Find case-sensitive text within text

Returns the first matching one-based position and is case-sensitive. The optional start defaults to 1 and must be at least 1. Missing text returns #VALUE!. Positions use Google Sheets UTF-16 indexing.

=FIND("g", "Hugtab")

Result: 3

IF

IF(condition, value_if_true, [value_if_false])

Conditional value

Only the selected branch is evaluated. The omitted false result is FALSE.

=IF(2>1, "Yes", 1/0)

Result: "Yes"

IFERROR

IFERROR(value, [value_if_error])

Return a fallback when a formula errors

Evaluates the fallback only when the first value produces a typed formula error. An omitted fallback returns a blank.

=IFERROR(1/0, 7)

Result: 7

INDEX

INDEX(reference, row, [column])

Return a value at a row and column within a range

Row positions are one-based and required. Column is optional for a one-column range. Zero indexes and array-returning forms are unsupported; positions outside the range return #REF!.

Enter these values first:

A1: 10
B1: 15
A2: 20
B2: 25
A3: 30
B3: 35
=INDEX(A1:B3, 2, 2)

Result: 25

LEFT

LEFT(string, [number_of_characters])

Return characters from the start of text

Defaults to one character. Zero is allowed; a negative count returns #VALUE!. Character positions follow Google Sheets UTF-16 indexing, including when a position splits a surrogate pair. Scalar values are converted to text; numeric text and booleans are accepted for the count.

=LEFT("Hugtab", 3)

Result: "Hug"

LEN

LEN(text)

Text length

Blank values become empty text. Booleans become TRUE or FALSE.

=LEN("Hugtab")

Result: 6

LOWER

LOWER(text)

Lowercase text

Converts a value to text, then lowercases it.

=LOWER("Hello")

Result: "hello"

MATCH

MATCH(search_key, range, search_type)

Return the position of an exact match in a one-dimensional range

Returns the first matching position in a row or column. Text keys use case-insensitive exact matching; * and ? are wildcards and ~ escapes them. Set search_type to 0; it is required because approximate modes 1 and -1 are unsupported. Missing keys and two-dimensional ranges return #N/A.

Enter these values first:

A1: Apple
A2: Banana
A3: Pear
=MATCH("Banana", A1:A3, 0)

Result: 2

MAX

MAX(value1, [value2, …])

Maximum numeric value

Cell and range references ignore text, booleans, and blanks; referenced formula errors propagate. Numeric-looking text and booleans supplied directly count; direct nonnumeric text returns #VALUE!. Returns 0 when no numeric values remain.

=MAX(3, -2, 8)

Result: 8

MID

MID(string, starting_at, extract_length)

Return characters from within text

The starting position is one-based and must be at least 1. A zero length is allowed; negative lengths return #VALUE!. Character positions follow Google Sheets UTF-16 indexing. Scalar values are converted to text; numeric text and booleans are accepted for the indexes.

=MID("Hugtab", 2, 3)

Result: "ugt"

MIN

MIN(value1, [value2, …])

Minimum numeric value

Cell and range references ignore text, booleans, and blanks; referenced formula errors propagate. Numeric-looking text and booleans supplied directly count; direct nonnumeric text returns #VALUE!. Returns 0 when no numeric values remain.

=MIN(3, -2, 8)

Result: -2

MONTH

MONTH(date)

Return the month of a date serial

Returns 1–12 for a nonnegative date serial or ISO date text.

=MONTH(DATE(2024,2,29))

Result: 2

NOT

NOT(logical)

Logical negation

Zero, blanks, and empty text are false before negation.

=NOT(FALSE)

Result: TRUE

OR

OR(logical1, [logical2, …])

Logical OR

Uses the same truth conversion as AND.

=OR(FALSE, 2>1)

Result: TRUE

RIGHT

RIGHT(string, [number_of_characters])

Return characters from the end of text

Defaults to one character. Zero is allowed; a negative count returns #VALUE!. Character positions follow Google Sheets UTF-16 indexing. Scalar values are converted to text; numeric text and booleans are accepted for the count.

=RIGHT("Hugtab", 3)

Result: "tab"

ROUND

ROUND(value, [digits])

Round a number

Defaults to 0 decimal places. Halfway values round away from zero; negative digits round to tens, hundreds, and so on.

=ROUND(-2.5)

Result: -3

SUBSTITUTE

SUBSTITUTE(text, old_text, new_text, [instance_num])

Replace matching text

Replaces every case-sensitive match unless a one-based instance number is supplied. An instance number below 1 returns #VALUE!; a number beyond the number of matches leaves text unchanged. An empty old_text leaves text unchanged. Scalar values are converted to text.

=SUBSTITUTE("a-b-a", "a", "x", 2)

Result: "a-b-x"

SUM

SUM(value1, [value2, …])

Sum numeric values or ranges

Cell and range references ignore text, booleans, and blanks; referenced formula errors propagate. Numeric-looking text and booleans supplied directly count; direct nonnumeric text returns #VALUE!.

Enter these values first:

A1: 10
A2: 20
A3: note
=SUM(A1:A3)

Result: 30

SUMIF

SUMIF(criteria_range, criterion, [sum_range])

Conditional sum for one criterion

Matches text without case sensitivity. Criteria support =, <>, <, <=, >, >= and * / ? wildcards; prefix a wildcard or tilde with ~ to match it literally. SUMIF uses the sum range top-left cell and scans the criteria range shape.

Enter these values first:

A1: Paid
A2: Pending
A3: Paid
B1: 10
B2: 20
B3: 30
=SUMIF(A1:A3, "Paid", B1:B3)

Result: 40

SUMIFS

SUMIFS(sum_range, criteria_range1, criterion1, [criteria_range2, criterion2, …])

Conditional sum for multiple criteria

A row is summed only when all criteria match. Text criteria are case-insensitive; criteria ranges must match the sum range dimensions.

Enter these values first:

A1: Paid
A2: Pending
A3: Paid
B1: 10
B2: 20
B3: 30
C1: 10
C2: 20
C3: 30
=SUMIFS(C1:C3, A1:A3, "Paid", B1:B3, ">=10")

Result: 40

TRIM

TRIM(text)

Trim spaces

Removes leading, trailing, and repeated ordinary spaces, leaving one space between words. Tabs, line breaks, and non-breaking spaces are preserved.

=TRIM("  a   b  ")

Result: "a b"

UPPER

UPPER(text)

Uppercase text

Converts a value to text, then uppercases it.

=UPPER("Hello")

Result: "HELLO"

VLOOKUP

VLOOKUP(search_key, range, index, is_sorted)

Find an exact key in the first table column

Returns the first case-insensitive exact match. In text keys, * matches any number of characters and ? matches one; prefix either with ~ to match it literally. Set is_sorted to FALSE; it is required because approximate matching is unsupported. A missing key returns #N/A.

Enter these values first:

A1: Apple
A2: Banana
A3: Pear
B1: 10
B2: 20
B3: 30
=VLOOKUP("Banana", A1:B3, 2, FALSE)

Result: 20

YEAR

YEAR(date)

Return the year of a date serial

Accepts a nonnegative date serial or ISO date text; ignores any time fraction.

=YEAR(DATE(2024,2,29))

Result: 2024