Skip to content
REFERENCE

U.ADD_NEWLINES

Summary

Adds newlines above and/or below values in cells to create spacing from rows below and/or above

Syntax

=U.ADD_NEWLINES(input, [num_to_append], [num_to_prepend], [all_cells])

Parameters

Parameter Required Description
input Yes The cells whose values will have newlines appended and/or prepended
[num_to_append] No The number of newlines to append to cell contents Default is 1 if not specified If a 2nd number is provided, that many spaces will be added to right of each line in cell
[num_to_prepend] No The number of newlines to prepend to cell contents Default is 0 if not specified If a 2nd number is provided, that many spaces will be added to the left of each line in cell
[all_cells] No If set to TRUE then even cells containing numbers and boolean values have newlines added By default only cells that are blank or contain strings have newlines added

Behavior

The documented public interface is supported by the current U Add-in source signature and the maintained Usage Examples workbook. Optional parameters are shown in square brackets in the syntax above; omit the brackets when entering a formula.

Return Value

Returns the function result or action status described by the formula and parameters above. The maintained sources do not define a narrower, stable return contract for this function.

Examples

=U.ADD_NEWLINES(B5:B7)

Notes

  • Formula examples are preserved from maintained workbook usage and normalized to the current U. prefix.
  • Complete formulas demonstrate working patterns; they do not imply that undocumented option values are supported.
  • Where maintained sources do not specify every accepted value, default, or error message, this page does not infer one.
  • For functions that perform actions, use a visible trigger or supported block/throttle parameter to avoid unintended repetition during recalculation.