Hello,
I have a semi-successful solution to my problem. The formula below extracts the item number from a URL but only when the URL is "clean". If the URL has text within it as shown in cell A3, I get incorrect results.
In the table below, the first output is correct but the second is not. Column C shows the correct desired output.
What modification to this formula would target everything present after the last forward "/" slash but before the ".ip"?
Thanks
I have a semi-successful solution to my problem. The formula below extracts the item number from a URL but only when the URL is "clean". If the URL has text within it as shown in cell A3, I get incorrect results.
In the table below, the first output is correct but the second is not. Column C shows the correct desired output.
What modification to this formula would target everything present after the last forward "/" slash but before the ".ip"?
Excel 2013 32 bit | |||||
---|---|---|---|---|---|
A | B | C | |||
2 | https://www.samsclub.com/sams/118235.ip | SAM-118235 | SAM-118235 | ||
3 | https://www.samsclub.com/sams/oif-vertical-file-cabinet-4-drawer-economy-letter-26-1-2-black/prod5380361.ip | SAM-black/prod5380361 | SAM-prod5380361 | ||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B2 | =IF(A2<>"","SAM-"&LEFT(TRIM(RIGHT(SUBSTITUTE(A2,"/sams/",REPT(" ",20)),20)),LEN(TRIM(RIGHT(SUBSTITUTE(A2,"/sams/",REPT(" ",20)),20)))-3),"") |
Thanks