Editing
Extract ASIN from URL
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Google sheets approach == <pre> =REGEXEXTRACT(A2, "\/dp\/([a-zA-Z0-9]{10})\/?") </pre> Here's the explanation for each part of the formula: * `=REGEXEXTRACT(A2, "\/dp\/([a-zA-Z0-9]{10})\/?")` * `REGEXEXTRACT`: This function is used to extract specific portions from a text string based on a regular expression pattern. * `A2`: This cell contains the Amazon URL. * `\/dp\/`: This part of the regular expression is used to match the `/dp/` string, which usually precedes the ASIN code in the URL. * `([a-zA-Z0-9]{10})`: This part is used to match any 10-character long string made up of letters and numbers. This represents the ASIN code. * `\/?`: This part indicates that the URL may end with a slash, but it is not mandatory. Overall, this formula extracts the 10-digit ASIN code from the Amazon URL in cell A2. It's important to note that `REGEXEXTRACT` is a function in Google Sheets<ref>[https://support.google.com/docs/answer/3098244?hl=en&sjid=13459653721424677993-AP REGEXEXTRACT - Google Docs Editors Help]</ref>, not a built-in function in Microsoft Excel. If you are using Excel, this formula will not work. Alternatively, achieving the same functionality in Excel is more complicated and may require the use of VBA (Visual Basic for Applications) or other methods.
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
Tools
What links here
Related changes
Special pages
Page information