Functions Utility

ReplaceArray

The ReplaceArray() function replaces strings in a data range based on an array of replacement pairs.


Syntax:

Qx.ReplaceArray(Data Range, [Replacement Values])
  • In Excel with Quintessence add-in versions prior to 25.1, use: ReplaceArray()
  • In the Quintessence Editor (Studio) using Quintessence language, use: ReplaceArray()
  • In the Quintessence Editor (Studio) using Python language, use: Qx.ReplaceArray()
 See parameter descriptions

Data RangeThe range of data used as input.
Replacement Values
(optional)
A range of paired values: the original text and its replacement.

Remarks:

  • The default parameters are:
    • Replacement Values: No replacement occurs.

Examples:

The examples provided below are based on fictitious data for illustrative purposes only.

> Example 1: Replace shortened names with their full names


Data block (A1:C6):

DateSectorWeight
31-Jan-18Banking0.26
31-Jan-18Ind0.21
31-Jan-18Mining0.45
31-Jan-18Ins0.3
31-Jan-18Tel0.5

Replacement pairs (A10:B12)

IndIndustrial
InsInsurance
TelTelecoms

Function call:

=Qx.ReplaceArray(A1:C6, A10:B12)

Result:

DateSectorWeight
31-Jan-18Banking0.26
31-Jan-18Industrial0.21
31-Jan-18Mining0.45
31-Jan-18Insurance0.3
31-Jan-18Telecoms0.5