Solved

Extracting Text within 2 Symbols in Excel

Posted on 2016-11-12
5
43 Views
Last Modified: 2016-11-13
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,
0
Comment
Question by:fb1990
  • 3
5 Comments
 
LVL 18

Accepted Solution

by:
Roy_Cox earned 400 total points
ID: 41884710
Assuming the text is in A1 try

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

Assisted Solution

by:davorin
davorin earned 100 total points
ID: 41884711
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
 
LVL 1

Author Closing Comment

by:fb1990
ID: 41884831
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
 
LVL 18

Expert Comment

by:Roy_Cox
ID: 41885124
Pleased to help.
0
 
LVL 18

Expert Comment

by:Roy_Cox
ID: 41885163
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

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question