
Dynamic ArrayLevel: ExpertAvailable in: Excel 365 / 2021+
In this article
- Syntax
- Examples
- Example 1
- Related functions
TRIMRANGE removes empty rows and columns from the outside of a range, so formulas can point at whole columns without processing a million blanks.
Syntax
=TRIMRANGE(range, [trim_rows], [trim_cols])
| Argument |
What it means |
trim_rows |
0 none, 1 leading, 2 trailing, 3 both (default). |
Examples
Example 1
=UNIQUE(TRIMRANGE(A:A))
Unique values from a column that keeps growing.
DROP · FILTER
📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.
✨ Ask AI about this articleStuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong