+ Reply to Thread
Results 1 to 13 of 13

Copy webpage hyperlinks

  1. #1
    Registered User
    Join Date
    05-15-2014
    MS-Off Ver
    Excel 2003
    Posts
    22

    Copy webpage hyperlinks

    Copy webpage hyperlinks

    Hi

    I want to copy the hyperlinks on these pages and insert in excel - is there perhaps a macro that can do this

    https://registers.cidb.org.za/Public...=1100001001000
    https://registers.cidb.org.za/Public...=1100001001000
    https://registers.cidb.org.za/Public...=1100001001000
    https://registers.cidb.org.za/Public...=1100001001000

    thanks

    imtiaz

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

    Question Re: Copy webpage hyperlinks


    Hi !

    Maybe its possible if we should know what is exactly needed ‼

    So attach a sample result worksheet from a webpage …

  3. #3
    Registered User
    Join Date
    05-15-2014
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Copy webpage hyperlinks

    hi

    sample file attached with page 1 and page 2 results - I selected the hyperlinks and copied but if that cannot be done then maybe we can copy the entire page and paste in excel and thereafter delete the unnecessary parts

    thanks
    Attached Files Attached Files

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

    Re: Copy webpage hyperlinks


    Do you need to keep links in column CRS or just text only ?
    Last edited by Marc L; 07-31-2014 at 07:54 PM.

  5. #5
    Registered User
    Join Date
    05-15-2014
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Copy webpage hyperlinks

    I need to keep the links in column CRS only - other columns and other info not required

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

    Cool Try this demonstration !


    Try in a new workbook, must paste code to a worksheet module :
    Please Login or Register  to view this content.
    As the website is pretty slow, procedure needs around 30s to load 40 links …

    You just have to moderate the data according to your needs …

    Enjoy it and don't forget to click on bottom left button Add Reputation of this post !

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Copy webpage hyperlinks

    Hello platesigns,

    Here is another version. It uses 2 worksheets. "Sheet2" holds all the URLs you want to return CRS lnks from. "Sheet1" displays the CRS numbers and each one is linked to its contractor page.

    The worksheets and the ranges used can be easily changed if needed. The end of range for the URLs is automatically found . You only need to provide the starting cell address. Likewise, the CRS numbers are added after the starting cell for the destination address.

    A blank row is inserted after the CRS numbers are copied to the worksheet. Not sure if this a feature you need. if not, it is easy to remove.

    There is a button on "Sheet2" to run the macro. Have a look at the attached workbook.


    Here is the code for the macro. It is commented to help you understand the code better.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  8. #8
    Registered User
    Join Date
    05-15-2014
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Try this demonstration !

    Hi

    I am getting an error at line : Me.Paste [B1] - invalid key Me

    also how do I do it for multiple pages i.e. page 1 to say page 5

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

    Re: Try this demonstration !


    'Cause you didn't apply :

    Quote Originally Posted by Marc L View Post
    Try in a new workbook, must paste code to a worksheet module :
    You can also in code place cursor on Me statement and hit F1 key and read …

    And as you should read in the code, 40 lines are directly requested !
    So if you need more, increase PageSize or PageNo …

  10. #10
    Registered User
    Join Date
    05-15-2014
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Try this demonstration !

    Hi

    it works perfectly except that it is limited to 150 lines per page by the webpage itself
    so there has to be a FOR loop for page numbers

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

    Re: Copy webpage hyperlinks


    Hi,

    yes you can increase parameter PageNo !

  12. #12
    Registered User
    Join Date
    05-15-2014
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Copy webpage hyperlinks

    u can do each page number on its own but can u do them in one go i.e. page 1,2,3 and 4 one after the other automatically

  13. #13
    Registered User
    Join Date
    05-15-2014
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Copy webpage hyperlinks

    hi

    what I don't follow is how are setting the code to 4 pages and 10 results per page ?

+ 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. Replies: 0
    Last Post: 05-23-2014, 12:19 AM
  2. Find Hyperlinks, Copy Hyperlinks to alternative sheet, print all hyperlinks
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2013, 05:13 PM
  3. copy/pasting from webpage - hyperlinks are lost
    By partorg in forum Excel General
    Replies: 2
    Last Post: 06-23-2011, 06:37 AM
  4. Hyperlinks in Excel Saved as Webpage
    By banditrvp in forum Excel General
    Replies: 0
    Last Post: 01-09-2007, 12:49 AM
  5. Replies: 0
    Last Post: 05-14-2006, 11:45 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