Parse out Unique Identifier number out of URL?

moemaus

New Member
Joined
Dec 3, 2014
Messages
2
Hi,

I urgently need help!

What method or combination of methods would I have to use to parse the eight digit unique identifier out of an URL?

For example for the bold identifier below:

http://www.fitnessfactory.com?csrc=PPCADW-factory&ldd={ifsearch:s}{ifcontent:c}Q4nP8ZLc|pcrid|{creative}


Thank you!
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
If it's always followed by the 1st "|" symbol, use this formula assuming the URL is in cell A1:
Code:
=MID(A1,FIND("|",A1)-8,8)
If it isn't always followed by the 1st "|" symbol, please post some more sample data so we can try to identify a pattern.
 
Upvote 0
If it's always followed by the 1st "|" symbol, use this formula assuming the URL is in cell A1:
Code:
=MID(A1,FIND("|",A1)-8,8)
If it isn't always followed by the 1st "|" symbol, please post some more sample data so we can try to identify a pattern.


Thanks for the quick Answer!

It is always followed by "|", but when I type in the formula (adjusted the the respective cell) there appears a failure message "the formula you typed in contains an error."

What exactly does the -8 and 8 stand for? Maybe the mistake is connected to this.
 
Upvote 0
Make sure you changed both instances of A1 to the cell that contains your.
It works for me with your url copied into A1.

The "Find" portion determines that the 1st "|" symbol is the 88th character in your string. I'm subtracting 8 from that so in the Mid formula it will start in the 80th position which is where your 8 digit unique identifier begins. The 8 says to return 8 characters.
Here's a link with further explanation:
Using Excel's Find and Mid to extract a substring when you don't know the start point - TechRepublic

If you still can't get it to work, please upload a copy of your excel file to a file sharing service and post the link to open it back here on this thread. (please make sure to set the security on the file so anyone with the link can download it, and don't upload any confidential or proprietary data).
 
Upvote 0

Forum statistics

Threads
1,216,102
Messages
6,128,853
Members
449,471
Latest member
lachbee

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