This means that Excel won’t return thousands of zeros if the calculation references empty cells.

Excel also lets you be more targeted with your use of TRIMRANGE by using Trim References.

punch in

Example

Description

Trailing trim (:.)

iPhone 16e with iPhone 16 Plus and iPhone 16 Pro in hand against grey wall.

A1:.E10

Trim trailing blanks

Leading trim (.

:E10

Trim leading blanks

Full trim (.:.)

An Excel table with a named range.

A laptop with Microsoft Excel app.

Lucas Gouveia / How-To Geek |Kamil Zajaczkowski/ Shutterstock

An Excel sheet containing values in column A, and the LEN function in cell B1.

An Excel sheet containing the LEN calculation beyond the required cells.

The LEN function with TRIMRANGE in Excel.

An Excel sheet containing the LEN function with TRIMRANGE, with two new values added at the bottom of the range to show its function.