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 Range | The 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):
| Date | Sector | Weight |
| 31-Jan-18 | Banking | 0.26 |
| 31-Jan-18 | Ind | 0.21 |
| 31-Jan-18 | Mining | 0.45 |
| 31-Jan-18 | Ins | 0.3 |
| 31-Jan-18 | Tel | 0.5 |
Replacement pairs (A10:B12)
| Ind | Industrial |
| Ins | Insurance |
| Tel | Telecoms |
Function call:
=Qx.ReplaceArray(A1:C6, A10:B12)Result:
| Date | Sector | Weight |
| 31-Jan-18 | Banking | 0.26 |
| 31-Jan-18 | Industrial | 0.21 |
| 31-Jan-18 | Mining | 0.45 |
| 31-Jan-18 | Insurance | 0.3 |
| 31-Jan-18 | Telecoms | 0.5 |
