0

So, I've imported emails to google sheets and I'm trying to extract some info.

e.g.: "Bla Bla Bla Ref: 338256 Clients: André Paulos, Beatriz Silva Thank you" To retrieve the value of "Ref" I'm using: =ArrayFormula(REGEXEXTRACT(A2:A,"[\n\r].Ref: \s([^Clients]*)"))

If I use the same for extracting Clients' names, I get the results with a lot of missing characters. For the above example, it returns "André P". (Using: =ArrayFormula(REGEXEXTRACT(A2:A,"[\n\r].Clients: \s([^Thank*)"))

What am I missing? Thanks in advance

1 Answer 1

2

See if this helps

 =Arrayformula(if(len(A2:A), trim(regexextract(A2:A, "([^\:]*),")),))

or

=Arrayformula(if(len(A2:A), regexextract(A2:A, "Clients: (.*),")),))
Sign up to request clarification or add additional context in comments.

1 Comment

The first one worked! I just had to change the first comma for "Thank". Thank you very much!

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.