Instructions for using the TRIMRANGE function to clean up Excel tables
This means that Excel will not return thousands of zeros if the calculation refers to empty cells. Conversely, when you expand the contents of the reference area, the Excel TRIMRANGE function is automatically expanded. Here is a guide to using the Excel TRIMRANGE function.
How to use the TRIMRANGE Excel function
For example, we have the example table below, using the LEN function in Excel to count the number of characters in each cell in column A. You click on any cell and enter the formula =LEN(A:A) as shown.
And when you press Enter to return the result, you will see that the cells without content will return 0 until the end of column A.
When using the Excel TRIMRANGE function , the calculation will require Excel to remove all blank cells, trim excess data, and leave only the cells with the data to be calculated.
The TRIMRANGE function formula =LEN(TRIMRANGE(A:A)). When Enter is pressed, the result of the returned data table will remove the zeros as shown below.
When you continue to add values to column A, Excel automatically returns the corresponding results below.
Note, this function is currently only available to Microsoft Insider members in the Beta Channel (Version 2409, Build 18020.2000 or later).
You should read it
- Basic Excel functions that anyone must know
- How to use Hlookup function on Excel
- How to use the SUM function to calculate totals in Excel
- How to use the LEN function in Excel
- How to use COUNTIF function on Excel
- How to use the MOD function and QUOTIENT function in Excel
- How to use MID functions to get strings in Excel
- How to use Excel's VALUE function
- How to use the WRAPROWS function in Excel
- How to use the IFS function in Excel 2016
- How to use the NPER function in Excel to plan loans and savings
- How to use the function to delete spaces in Excel