I have the list with like 100,000 site link strings
- Each link is unique, but it has consistent
?Item= - Then, it’s either nothing or it continues after
&symbol.
My question is: How do I pull out the item numbers?
I know replace function can offer similar functionality, but it works with Fixed sizes, in my case string can be different in size.
Link example:
www.site.com?sadfsf?sdfsdf&adfasfd?Item=JGFGGG55555
or
www.site.com?sadfsf?sdfsdf&adfasfd?Item=JGFGGG55555&sdafsdfsdfsdf
In both cases I need to get JGFGGG55555 only
If this always is the last portion of the string, you can use the following:
This assumes:
Edit:
With the update to your question, it is apparent you have some strings with additional data after the
?Item=field. Without using VBA there is not a simple means of usingMIDandFINDto extract this.However you could create a column which acts as a placeholder.
For example, create a column using:
This gets you the following value:
JGFGGG55555&sdafsdfsdfsdfNext, create a column using:
This produces:
JGFGGG55555by searching the first value for a&and using the portion before it. If it is not found, the first value is simply repeated.