+ Reply to Thread
Results 1 to 7 of 7

Scrape website using VBA

  1. #1
    Registered User
    Join Date
    06-25-2014
    Location
    Falkirk, Scotland
    MS-Off Ver
    Office Excel 2013
    Posts
    31

    Scrape website using VBA

    Hi folks

    I have a list of product page URLs from a website, stored in Column A
    Example page: http://www.crazyprofit.co.uk/High_Qu...1408140916.htm

    In columns B-D I would like to scrape the following data
    B: Product Name (Heavy Duty Samsung Cables-7255 on example page)
    C: Price (£3.29 on example page)
    D: Optional added shipping charge (£1.50 on example page once selected from drop down menu)

    I know there's a way to get the data that I require in columns B & C, using VBA, I'm clueless at writing functions though

    Any help would be greatly appreciated!

  2. #2
    Forum Contributor
    Join Date
    02-24-2013
    Location
    California
    MS-Off Ver
    Excel 2010
    Posts
    317

    Re: Scrape website using VBA

    1. What browser are you using? Google? Internet Explorer? Google Chrome? Firefox? etc..... (this makes a big difference in the code)
    2. Have you done any internet research on this? I ask because this request is asked nearly every week. If you search this forum using the upper right-hand box, you will get dozens of answers and solutions you could use. A google search provides even more codes, examples, solutions and videos.
    If I helped in any way, please click the star

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

    Re: Scrape website using VBA


    Hi,

    see from a worksheet New query on the Web (QueryTable in VBA) …

    Other beginner level way but with internet skills : Automate Internet Explorer

    More efficient but at advanced level : requests !

    Many sample of each way in this forum …

  4. #4
    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: Scrape website using VBA

    Hello cfcMalky,

    After looking the site, it is very unlikely any of the proposed solutions will do you any good.

    The attached workbook reads the URLs in column "A" and outputs the Product Name, Shipping Options, and Price in columns B to D in the same row.

    To run the macro select "Run" from the Macro Dialog. Press ALT+F8 to to see the available macros. Try it out and let me know the results.

    Nollaig chridheil!
    Attached Files Attached Files
    Last edited by Leith Ross; 12-25-2014 at 08:14 PM.
    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!)

  5. #5
    Registered User
    Join Date
    06-25-2014
    Location
    Falkirk, Scotland
    MS-Off Ver
    Office Excel 2013
    Posts
    31

    Wink Re: Scrape website using VBA

    Nice one Ross!, that sheet does exactly what I'm needing, thanks a bunch!

  6. #6
    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: Scrape website using VBA

    Hello cfcMalky,

    You're welcome. I know there any many native Scots who speak Gaelic but I have to ask (I'm still learning)...

    A bheil Gàidhlig agaibh?

  7. #7
    Registered User
    Join Date
    06-25-2014
    Location
    Falkirk, Scotland
    MS-Off Ver
    Office Excel 2013
    Posts
    31

    Re: Scrape website using VBA

    lol, If you've even spent as much as 10 minutes learning Gaelic then you'll know a bit more than me!

    I Live in Central Scotland and English is the language we use (Although in recent years there have been more and more people speaking Polish, Lithuianian, Hungarian, Bulgarian etc as the country fills up with Eastern European immigrants)

    Fact: There are a lot more Polish speaking people in Scotland than there are Gaelic

+ 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. Logon daily to website, Scrape data, and paste into Excel 2003 Using VBA
    By Gloopie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-28-2014, 09:25 AM
  2. Scrape, pull or get data from a Website into Excel Please help me out
    By baig123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-21-2014, 01:42 PM
  3. VBA Macro to Scrape Website - Post to Javascript
    By shahzeb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-21-2014, 05:53 PM
  4. [SOLVED] Pull Specific Data from Website (Screen Scrape)
    By CHRISEWRIGHT20 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-11-2012, 11:03 AM
  5. VBA to scrape data from website
    By jdub22cb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-16-2012, 04:00 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