ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   find and replace text (https://www.excelbanter.com/excel-programming/369534-find-replace-text.html)

choice[_2_]

find and replace text
 
if i have a image that is located at a location like this
http://www.website.com/site/images.p...ghi/DTT900.jpg
i just want DTT900.jpg

but the same find and replace has to work for something like this:
http://www.doba.com/site/images.prod...pics/1/160.jpg
and return 160.jpg

so basically i need it to find the last "/" then return anything after that.

Thanks in advance

Steve Yandl

find and replace text
 
After you get your hyperlink as text, you can use something like:

strHTTP =
"http://www.website.com/site/images.products/2/PSproduct_pics/delonghi/DTT900.jpg"

arrPath = Split(strHTTP, "/")
strImageName = arrPath(UBound(arrPath))

MsgBox strImageName


Steve


"choice" wrote in message
...
if i have a image that is located at a location like this:
http://www.website.com/site/images.p...ghi/DTT900.jpg
i just want DTT900.jpg

but the same find and replace has to work for something like this:
http://www.doba.com/site/images.prod...pics/1/160.jpg
and return 160.jpg

so basically i need it to find the last "/" then return anything after
that.

Thanks in advance





All times are GMT +1. The time now is 08:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com