+ Reply to Thread
Results 1 to 20 of 20

Transferring data from many different websites to Excel

  1. #1
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,427

    Transferring data from many different websites to Excel

    I have a (long) list of websites on sheet sites and I want to transfer the relevant data from those websites to sheet Results.
    How can I best do that?

    Note: Relevant data is the data in the tables, but not the data in the headers and footers.

    See in attachment example with 4 websites.
    Attached Files Attached Files

  2. #2
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,427

    Re: Transferring data from many different websites to Excel

    96 hours later:

    51 views,
    7 downloads,
    0 replies.

    Does that mean what I'm asking isn't possible or was everyone looking for Easter eggs?
    If it's not possible, could someone post why that is?

    Thanks for the help.

  3. #3
    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,853

    Re: Transferring data from many different websites to Excel

    It's the Easter weekend - you porobably shouldn't expect people to be at your disposal over a holiday.

    Pretty sure it's doable with PowerQuery, but you are at the mercy of the PQ experts.
    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.

  4. #4
    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,853

    Re: Transferring data from many different websites to Excel


  5. #5
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,427

    Re: Transferring data from many different websites to Excel

    Ali, Thank you for the tutorials.

    I had also tried a few things, but couldn't get started.
    Maybe I'm fiddling or doing something wrong or overlooking something or maybe the website is not suitable?

    I am happy to wait for help from experts in this field.

  6. #6
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: Transferring data from many different websites to Excel

    Are you open to VBA?

  7. #7
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,427

    Re: Transferring data from many different websites to Excel

    Yes sure I'm.

    I think I prefer VBA over power query.
    Although I never post VBA algorithms myself, I do know something about VBA.

    I don't know anything about Power Query.

    Moreover, VBA offers more possibilities
    Last edited by HansDouwe; 04-01-2024 at 08:33 AM.

  8. #8
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: Transferring data from many different websites to Excel

    Ok! Here you go. Open VBA, insert a new empty module and paste this code there.
    Before you run this, clear your results sheet first.

    You can start the code by running the "jec" macro.


    Please Login or Register  to view this content.
    Last edited by JEC.; 04-01-2024 at 09:03 AM.

  9. #9
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,427

    Re: Transferring data from many different websites to Excel

    Thank you Jec.
    Could you tell me exactly which buttons I should click?
    I don't see how to add a new module after clicking the developers tag.

    EDIT: I have now figured out how to do it. See next post.
    Last edited by HansDouwe; 04-02-2024 at 01:21 AM.

  10. #10
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,427

    Re: Transferring data from many different websites to Excel

    I have now managed to get the module working and it works perfectly.
    Thank you very much for that.

    I also modified the module, in case multiple columns are needed.
    Would you like to adjust the module so that the link itself is also placed in the output (prior to the associated data in column A)?

    By the way: Saving this macro enabled file on my laptop takes about 10 seconds. What could that be?
    Attached Files Attached Files

  11. #11
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: Transferring data from many different websites to Excel

    Hi Hans, do you want the url in every cell in column A or just once, every time

  12. #12
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,427

    Re: Transferring data from many different websites to Excel

    Hi Jec, I want the url in every row, I think about it now. That's the easiest starting point for me.

  13. #13
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: Transferring data from many different websites to Excel

    Ok I rewrote the macro a bit. You can delete the current script and use this single one instead.
    The 10 mins before saving is weird though... here it saves without any problems.

    Please Login or Register  to view this content.

  14. #14
    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,853

    Re: Transferring data from many different websites to Excel

    Hans said it took 10 seconds to save, not 10 minutes.

  15. #15
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,427

    Re: Transferring data from many different websites to Excel

    @Jac,

    This works absolutely perfectly.
    This allows me to move forward.
    Also, the problems with saving the file no longer occur.

    Thank you very much.

  16. #16
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: Transferring data from many different websites to Excel

    Great! You’re welcome

  17. #17
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,427

    Re: Transferring data from many different websites to Excel

    After JEC's macro has been working smoothly for a while, it now suddenly produces a compile error, which I can't solve.

    I didn't modify the module.

    What is the cause of this error and how do I fix it.
    Attached Images Attached Images
    Attached Files Attached Files

  18. #18
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: Transferring data from many different websites to Excel

    What if yiu delete all that code and only use the script in post 13?

    I haven't opened your file yet but I think you use a combination of the two suggestions

    Edit (openend your file): Yes, you have a combination. So, clear the whole module. Also macro "jec" and the global variables.
    Then use the code of post 13 only.
    Last edited by JEC.; 04-03-2024 at 12:38 PM.

  19. #19
    Forum Guru HansDouwe's Avatar
    Join Date
    06-21-2022
    Location
    Nederland
    MS-Off Ver
    365 V2403 (Build 17330.20000)
    Posts
    6,427

    Re: Transferring data from many different websites to Excel

    Hi JEC,

    Yes, when I ditch the JEC procedure, everything works fine again. It's strange that when I called JEC earlier it worked fine, but later that was no longer the case.
    I can move forward again.

    Thanks again.
    Unfortunately, I cannot yet grant reputation again, because I have not yet awarded reputation to anyone else,
    Last edited by HansDouwe; 04-03-2024 at 11:49 PM.

  20. #20
    Forum Expert
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    1,386

    Re: Transferring data from many different websites to Excel

    Np Hans! Cheers

+ 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: 2
    Last Post: 03-31-2020, 01:59 PM
  2. Excel Worksheet that gets data from websites
    By joao1232 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-30-2019, 01:40 PM
  3. Trying to get data from a websites sorce code to excel
    By Jenkins27 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-25-2016, 10:17 PM
  4. get data from websites using Excel VBA
    By spiridus in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-28-2014, 05:38 AM
  5. download data from consecutive websites from excel.
    By za4 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2013, 01:16 AM
  6. Transferring data between websites and Excel
    By Baapi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-19-2006, 03:29 PM
  7. Transferring data between websites and Excel
    By Baapi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-19-2006, 03:29 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