Site icon Kaizen.Personal computer work.

Formula for extracting URL parameter values.(Microsoft Excel)

Japanese version.

Using Google Analytics UTM parameters as an example, we will
I will show you a formula to extract the value of a URL parameter with an Excel formula.

Sample file.

Usage.

Specify the URL you want to extract in the second and subsequent lines of column A, and
the name of the parameter you want to extract in the first line of column B and after, and
Copy the formula in B2 to the second and subsequent lines in column B and subsequent lines.
The values of the parameters corresponding to the formulas will then be displayed.

The formula for cell B2 is as follows.

The SUBSTITUTE, MID, FIND, IFERROR, and LEN functions are used.

=SUBSTITUTE(
  MID($A2,
      FIND(B$1,$A2),
      IFERROR(FIND("&",$A2,FIND(B$1,$A2))-FIND(B$1,$A2),LEN($A2))
  ),
  B$1&"=",
  ""
)

---

Links

General URL rules.

Exit mobile version