You can also use templated text and key-value replacements,
with either native functions or with a named-function.
|
A |
B |
1 |
Template Text => |
π1 was as tall as a π2 π3 |
2 |
Key-value pairs: |
|
3 |
π1βHe |
|
4 |
π2βsix-foot-three-inch |
|
5 |
π3βtree |
|
6 |
Formula : |
Output: |
7 |
=REDUCE(B1, A3:A5, LAMBDA(text, key_value, REGEXREPLACE(text, REGEXEXTRACT(key_value,"π\d+"), REGEXEXTRACT(key_value,"[^β]+$")))) |
He was as tall as a six-foot-three-inch tree |
As a named function:
TEMPLATE(template_text, key_value_pairs)

