2

I have the following URL in my Excel sheet rows:

www.test.com/folder1/?tagid=1234567

How do I extract the tagid value into a separate column so I simply have "1234567".

Thanks!

Nick R
  • 23

2 Answers2

4

It is probably not the cleanest solution, but it works:

=RIGHT(A1, LEN(A1)-FIND("tagid=",A1)-LEN("tagid=")+1)
1

I like to use the MID function because I can then modify the last parameter (length) in case my strings change in the future.

=MID(A1,SEARCH("=",A1)+1,999)

It looks for the equal sign, then takes 999 characters to the right of that.

In the future, if you add another parameter (e.g. ?tagid=1234567&userid=5555), you can simply replace the "999" for a second search condition.