+ Reply to Thread
Results 1 to 6 of 6

VBA to validate each website links in a column then copy only valid ones to another cell

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    VBA to validate each website links in a column then copy only valid ones to another cell

    I have list of website links in column A and another list of website links in column B (only one of the links in each column is valid).

    I am trying to copy only the valid website link to column C.

    i.e. Out of the two links in Cell A1 and Cell B1, only one of them are valid and I'd like Cell C1 to show the link that is valid. Same goes for the rest of the rows in column A and B.
    Ultimately, I'd like to see all the valid lists of links in column C.

    Any suggestions?

    Many thanks.
    Last edited by AliGW; 07-15-2018 at 04:41 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,626

    Re: VBA to validate each website links in a column then copy only valid ones to another ce

    Your original thread title was more specific, so I have changed it back.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: VBA to validate each website links in a column then copy only valid ones to another ce

    Thanks Ali

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Re: VBA to validate each website links in a column then copy only valid ones to another ce


    As it depends what means a "valid" URL on your side and on your workbook itself
    so without a technical explanation neither any attachment …

  5. #5
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Re: VBA to validate each website links in a column then copy only valid ones to another ce

    Hi Marc, one of the URLs in column A and B brings the following error (404 - Not Found and 302 - Found) and what I am trying to achieve is to find the URL that shows 200 - OK. I found the solution from the link below which does exactly what I wanted to achieve.

    http://www.vbaexpress.com/forum/show...RL-Returns-404

    Thanks.

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow


    May be achieved with fewer codelines like How to check URL validity

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Validate a valid date
    By calvinle in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-20-2017, 08:34 PM
  2. Validate data input against a list of multiple valid values
    By Grilleman in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-21-2017, 12:55 PM
  3. Valid Image Links
    By fitkhan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-20-2015, 06:22 AM
  4. Launch website simultaneously based on given links in a column
    By stoey in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2015, 06:24 PM
  5. email validation/verification from website ( remove non-existing valid emails )
    By raj soni in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-18-2014, 08:26 PM
  6. [SOLVED] How to i validate if all the values entered in userform textboxes are valid then execute.
    By amethystfeb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-01-2013, 12:33 PM
  7. [SOLVED] New to Forms-Validate a ComboBox and do something if not valid
    By mc84excel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-18-2013, 08:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1