Skip to main content
Workday User Guide
Last Updated: 2023-06-23
TRIMCOLUMNS

TRIMCOLUMNS

Description

Removes trailing blank columns from a range, when the data is a result of an unconstrained array formula.

Syntax

TRIMCOLUMNS(
range
)
  • range
    : The range to trim.

Example

When you use an array formula such as =SampleWorkerData!3:5, which contains an unconstrained row reference, the formula returns a blank in each cell across from the cells containing data in rows 3, 4, and 5.
The formula =TRIMCOLUMNS(SampleWorkerData!3:5) removes the trailing columns containing blanks in the cells.

Notes

  • This function is intended for use in array formulas. You submit array formulas with special keyboard shortcuts. We recommend that you use the unconstrained keyboard shortcut Ctrl+Alt+Enter (on Windows) or Command+Option+Enter (on Mac) so Worksheets can use all the cells it needs for the results. For more information, see Reference: Array Formula Keyboard Shortcuts.