Skip to content
REFERENCE

U.WORKSHEET_NAME

Summary

Returns the name of the calling worksheet if no parameters set. Renames a worksheet or changes its tab color if parameters are set or returns a list of all worksheets in the current workbook if first parameter is set to an asterisk. Also supports copying, creating and sorting worksheets

Syntax

=U.WORKSHEET_NAME([new_name], [worksheet], [block])

Parameters

Parameter Required Description
[new_name] No The new name to be given to the worksheet or name(s) of worksheet(s) to be created or sorted. Or a color name or Excel color index value preceded by "color:" If set to an asterisk ("*") then a list of all worksheets in the workbook is returned
[worksheet] No The current name of the worksheet to be renamed or copied. Include an asterisk (*) if the 1st param is a single value and intent is to create, copy or sort worksheets. Set to the string "[delete]" to delete worksheets specified in the 1st parameter. If not provided, the worksheet containing the method is renamed
[block] No If set to TRUE then method will not be calculated unless triggered by user interaction or calculated as a step in a script; If set to a number then will be throttled to not calculate more frequently than the specified number of seconds; make number negative to prevent auto recalc of blocked methods

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.PAD(U.WORKSHEET_NAME("*"))
=U.WORKSHEET_NAME()
=U.WORKSHEET_NAME("blah")

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.