TX Sheet Control

TRIMRANGE Function

Function

Return a range without its blank leading and trailing rows and columns. range is the range to trim. trim_rows and trim_cols select what is removed: 0 nothing, 1 leading blanks, 2 trailing blanks and 3 both (the default). Any other value returns #VALUE!. Blank rows and columns inside the data stay.

Syntax

TRIMRANGE(range, trim_rows, trim_cols)

Category: Lookup. Minimum arguments: 1. Maximum arguments: 3.

Available for supported offline calculation.

Examples

=TRIMRANGE(A1:C5)

Cell and range examples require appropriate input values in the referenced cells. Handle invalid arguments, formula errors and array and spill constraints.

See Also