1

i want to replace 3 caracters in one string

=ARRAYFORMULA({REGEXREPLACE(A5,"c","a"); REGEXREPLACE(A5,"d","x");REGEXREPLACE(A5,"v","y")})

is possible? I want to add it to a query on future too :D ty alot

2 Answers 2

1

should be like:

=REGEXREPLACE(REGEXREPLACE(REGEXREPLACE(A5,"c","a"), "d","x"), "v","y")))

for array:

=ARRAYFORMULA(REGEXREPLACE(REGEXREPLACE(REGEXREPLACE(A5:A,"c","a"), "d","x"), "v","y"))))
Sign up to request clarification or add additional context in comments.

Comments

0
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)

enter image description hereenter image description here

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.