Skip to content
REFERENCE

U.FORMAT_STRING

Summary

Inserts substrings into specified locations of string using C# string format syntax. If the insertion fails, the original format string is returned

Syntax

=U.FORMAT_STRING(format, insertions, [named], [reuse_format])

Parameters

Parameter Required Description
format Yes The string into which substrings will be inserted at specified locations
insertions Yes The substrings that will be placed into the format string. If optional [named] variable is TRUE then this should be a 2-column wide array with left column containing variable names and right column containing values to insert. To insert a range ref string instead of the range values, escape it with a backslash ('\')
[named] No If set to TRUE then insertions are done by name instead of position. When TRUE the value of any ClickVal names are also used as insertions, but will be overridden if the same name exists in the insertions parameter. To prevent use of ClickVal names, set as 2-column row vector with 2nd value set to FALSE
[reuse_format] No If set to TRUE and multiple insertions are provided but only a single format then insertions will all be applied to the provided format

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.FORMAT_STRING("config(match={0})",U.CONCAT(U.CONCAT(B145:C146,":",,TRUE),"|"))
=U.FORMAT_STRING(Q260,M255:N257,TRUE)
=U.FORMAT_STRING(B5,D5:E5)

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.