TRIMRANGE

TRIMRANGE(range,[trim_rows],[trim_cols])

Returns the array after excluding all empty rows and/or columns from the outer edges of a range.

rangeThe range (or array) to be trimmed.
trim_rows(Optional) Determines which rows should be trimmed:
0 = None
1 = Trims leading blank rows
2 = Trims trailing blank rows
3 = Trims both leading and trailing blank rows (default)
trim_cols(Optional) Determines which columns should be trimmed:
0 = None
1 = Trims leading blank rows
2 = Trims trailing blank rows
3 = Trims both leading and trailing blank rows (default)

REMARKS
* This is a Preview Function which means the signature and results may change before being officially released.
* This function was added in Microsoft 365
* The same functionality can also be achieved using the "Trim References".
* Trim References can be applied by replacing a range's colon ":" with either (.:.), (:.) or (.:)
* link - techcommunity.microsoft.com/t5/excel-blog/announcing-trimrange-and-accompanying-trim-references/ba-p/4230202
* This function was first released in August 2024.
* For the Microsoft documentation refer to support.microsoft.com

 A
1=TRIMRANGE(A1:E10,2,2)


© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top