Hello friends, I am having a difficult challenge that is not working inspite of several different methods I tried.
I want to verify the below mentioned 20 urls and find out which one is valid. The urls are in the range A1:A20. Out of these 20, only 2 urls are valid and the remaining are redirected to homepage. The only difference in these urls are that the three letter prefix to the six digits number at the end are different. I have around 500+ urls in column A that I need to verify. I want help in an excel vba code that helps me identify those 2 correct urls and append a text "valid" in the corresponding cell in column B. I have tried a lot of http and xml objects methods that returns headers and responses. however, i was unable to achieve what I desire and appreciate if I can get some help.
http://www.mywebsite.com/myfolder/on...ABC123456.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...DEF123456.aspx : valid url
http://www.mywebsite.com/myfolder/on...GHI123456.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...JKL123456.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...MNO123456.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...PQR123456.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...STU123456.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...VWX123456.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...YZA123456.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...BCD123456.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...ABC789012.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...DEF789012.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...GHI789012.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...JKL789012.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...MNO789012.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...PQR789012.aspx : valid url
http://www.mywebsite.com/myfolder/on...STU789012.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...VWX789012.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...YZA789012.aspx : redirected to http://www.mywebsite.com/Default.aspx
http://www.mywebsite.com/myfolder/on...BCD789012.aspx : redirected to http://www.mywebsite.com/Default.aspx
Thank you.
EDIT
Actually, I just want to write the 50+ numbers in column A and construct ten different urls with the prefix code ABC, DEF, GHI etc which I will store it in column E. If it is a valid url that does not redirect, the corresponding cell in column b should get a value "Valid" along with the correctly constructed url in column c. If that is possible![]()
Bookmarks