Reputation: 8961
Is it possible to do a string manipulation of data in a Google Sheet query?
I want to do something like the following:
=QUERY(someRange!A:Z, SELECT A, SUBSTITUTE(B, "OCH", ""))
The idea being that all rows' column B is 'OCHXXXXXXX' where X is a digit. I would like to get rid of the chars.
On a side note... Is this possible in MySQL? How?
Upvotes: 0
Views: 2229
Reputation: 3094
This formula might work for you:
=QUERY({Sheet1!A:A,ARRAYFORMULA(SUBSTITUTE(Sheet1!B:B,"OCH","")),Sheet1!C:Z})
Upvotes: 2
Reputation: 10259
I would suggest:
=arrayformula(REGEXREPLACE(somerange!B:B, "OCH", ""))
Upvotes: 1