Skip to content
REFERENCE

U.REPLACE

Summary

Replaces specified cells in a range with specified replacement values

Syntax

=U.REPLACE(data, from_or_match_map, to_or_range_map, [ignore_types_or_apply_all], [first_row_or_list1], [first_col_or_list2], [last_row_or_row_filter], [last_col_or_col_filter])

Parameters

Parameter Required Description
data Yes The range of data in which the values of specified cells will be replaced
from OR match_map Yes If short form, the value(s) to be replaced. If full form, the exact match replace settings. Use "columns([...])" or "rows([...])" to replace entire columns/rows with new ones
to OR range_map Yes If short form, the new value of replaced cells. If full form, optionally the value range(s) to be replaced. The replacement columns/rows when replacing entire columns or rows
[ignore_types OR apply_all] No If short form, set to TRUE to ignore value type when matching, default is FALSE. If full form set to TRUE to have all replacements applied, default is to apply only 1st match
[first_row OR list1] No If short form, the first row at which to apply replacements, default is 1. If full form, one or more lists of values to be replaced
[first_col OR list2] No If short form, the first column at which to apply replacements, default is 1. If full form, one or more lists of values to be replaced
[last_row OR row_filter] No If short form, the last row at which apply replacements, default is last in range. If full form, a list of row numbers to include or exclude from replacements globally. The row replacement mappings when replacing entire rows with new ones
[last_col OR col_filter] No If short form, the last column at which apply replacements, default is last in range. If full form, a list of column numbers to include or exclude from replacements globally. The column replacement mappings when replacing entire columns with new ones

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.DO(U.VAPPEND(C185,B121:C123,U.REPLACE(B134:D136,$B$145:$C$146)),U.NOW())
=U.REPLACE(B6:E11,M7:M8,N7)
=U.REPLACE(B6:E11,M17:M18,N17)

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.