Hugo
Hugo

Reputation: 33

Extract UTM parameters in Google Sheets

I need to extract UTM parameters in Google Sheets and I have, I believe, a simple question.

I would like to extract the value associated to the utm_campaign in column A to column B:

Example

If possible, I would like to keep the opportunity to do an Arrayformula for all the lines in column A and avoid using a script to do so.

Upvotes: 1

Views: 1554

Answers (2)

Hugo
Hugo

Reputation: 33

Okay, so I found an answer by myself!
Using the formula below works in that case:

=arrayformula(if(A2:A="","",REGEXEXTRACT(A2:A, "utm_campaign"":""([^""]+)""")))

Upvotes: 1

player0
player0

Reputation: 1

try:

=ARRAYFORMULA(IFNA(REGEXEXTRACT(A2:A, "utm_campaign"":""(\d+)")))

0

Upvotes: 1

Related Questions