Extracting Text within 2 Symbols in Excel

Hello EE,

I have the following dummy URL: http://www.amazon.com/dp/BPPK0T2MQI/  and i want extract BPPK0T2MQI.  Can someone please help me with an excel formula to extract.

Thanks,
LVL 1
Who is Participating?

Group Finance ManagerCommented:
Assuming the text is in A1 try

=LEFT(RIGHT(A1,11),10)
0

Commented:
You can try with =right(cell address, number of characters) if the number of extracted characters is always the same.

In your case if url is in A1 cell:
put next formula in B1 cell "=right(A1,11)" . You will get "BPPK0T2MQI/"
and then put next formula in C1 cell "=left(B1,10)" - you will get "BPPK0T2MQI"

https://www.extendoffice.com/documents/excel/3639-excel-extract-part-of-string.html

You could also use text to columns function and select / as column delimiter. You will get wanted strings in 5th column.
0

Author Commented:
Thanks to both of you.  I can use this for now.  It assumes the value will always be 10 digit. it may be more in the future.
0

Group Finance ManagerCommented:
0

Group Finance ManagerCommented:
There might be a simpler formula but this allows for varying lengths  of text

=LEFT(MID(RIGHT(A1,LEN(A1)-23),FIND("/",RIGHT(A1,LEN(A1)-22),FIND("/",RIGHT(A1,LEN(A1)-22))+1),1000),LEN(MID(RIGHT(A1,LEN(A1)-23),FIND("/",RIGHT(A1,LEN(A1)-22),FIND("/",RIGHT(A1,LEN(A1)-22))+1),1000))-1)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.