Trim some Url data

Sharid

Well-known Member
Joined
Apr 22, 2007
Messages
1,064
Office Version
  1. 2016
Platform
  1. Windows
I am trying to pull this from a url, but I am having problems triming it. I could do it with text to column by spliting via "=" but that splits it in several places. I have some urls in Sheet1 A and would like the results to go into B

Get this J4FE46MQDN8G7MECKSJ4
I have removed the https from the url as it kept converting it to a link
://amazon.co.uk/Amazon-co-uk-Gift-Card-Greeting-Abstract/dp/B07R3WMZWY/ref=zg_bsms_gift-cards_home_1/259-3701177-2096712?_encoding=UTF8&psc=1&refRID=J4FE46MQDN8G7MECKSJ4;3 Mb;DT: 103741.3 ms
 
Ok, how about
Excel Formula:
=INDEX(FILTERXML("<o><i>"&SUBSTITUTE(A2,"&amp;","</i><i>")&"</i></o>","//i"),2)
If the &amp; can appear in multiple places, rather than just the two, then this may not work.
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
Thanks fluff as always super work,

Is there any place I can literature on this so I know how to write it myself in future as I don't fully understand what you have done, but it works
 
Upvote 0
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,692
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top