At work, we have many products that change price frequently but not regularly. We try to be slightly cheaper than some of the ‘big boys’ in our industry but it is much too time consuming to look up the products on a daily basis. I want to create a spreadsheet that will look up each product on the competitors web site and let me know if the price has gone up, down, or remained the same. I believe I can create the macro to compare the current price to the previous price and indicate any change and make a recommendation as to the price change I should make on our web site. I’m thinking I need a for next VBA loop for a list of products – one on each row. The macro would need to go to their site, search for the product (typically each product has a page), and then somehow scrape the price. It is easy to do that when I pull up the page but I need the process to be automated so I could just run the macro each morning. I’ve tried to use the Data…From Web tool in Excel but it looks in tables and the information I’m looking for is not in a table. I believe I can write the VBA code if I can figure out how to get the info. Any ideas?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Automate Gathering Web Data…
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Automate Gathering Web Data…
- This topic has 3 replies, 4 voices, and was last updated 4 years, 9 months ago by
anonymous.
Tags: Excel gather web data
Viewing 2 reply threadsAuthorReplies-
woody
ManagerAugust 15, 2020 at 1:27 pm #2288831Posting for Rick Corbett, who’s having trouble posting…
Have a look at using AutoHotkey for web automation.
One chap – Joe Glines aka the-Automator – in particular springs to mind… ‘cos he specialises in this type of automation of web scraping.
Check out his website, particularly the section on web scraping…
Hope this helps…
-
This reply was modified 4 years, 9 months ago by
woody.
-
This reply was modified 4 years, 9 months ago by
-
Rick Corbett
AskWoody MVPAugust 15, 2020 at 7:07 pm #2288917Many thanks, Woody, for your intervention.
I didn’t get the chance to mention earlier but AutoHotkey understands/handles COM directly so can pump data into Excel spreadsheets if that’s what you need… although it sounds like you just need an event timer that checks online prices at regular intervals… which doesn’t need a spreadsheet (or log) unless you want to record a history of such changes.
Hope this helps…
-
anonymous
GuestAugust 15, 2020 at 9:47 pm #2288928I solved my problem by doing a little research on the web. Not all that complicated once you know what you are doing. Here is my code (edited).
Sub getBlowoutPrices()
Dim browser As New InternetExplorer
Set browser = CreateObject(“InternetExplorer.Application”)
browser.Visible = False
‘loop through the products in the spreadsheet
Dim prods As Range, prod As Range
Set prods = Sheets(“Sheet1”).Range(“A2:A52″)
For Each prod In prods
Dim searchProd As String
‘Prepare the search URL
searchProd = LCase(prod.Value)
searchProd = Replace(prod.Value, ” “, “-“)
browser.navigate “https://www.xxxxx.com/” & searchProd & “.html”
‘code to wait until the browswer finds the page.
Do
DoEvents
Loop Until browser.readyState = READYSTATE_COMPLETE
‘get the value from the web page and put it in column F
Set Doc = browser.document
Set priceclass = Doc.getElementsByClassName(“price”)
prod.Offset(0, 5).Value = priceclass.Item(0).innerText
Next
browser.Quit
Set browser = Nothing
End Sub
Viewing 2 reply threads - This topic has 3 replies, 4 voices, and was last updated 4 years, 9 months ago by
-

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Mozilla Firefox Security Updates! Released late 17th May 2025
by
Alex5723
1 hour, 17 minutes ago -
Microsoft: Troubleshoot problems updating Windows
by
Alex5723
5 hours, 7 minutes ago -
Woman Files for Divorce After ChatGPT “Reads” Husband’s Coffee Cup
by
Alex5723
5 hours, 15 minutes ago -
Moving fwd, Win 11 Pro,, which is best? Lenovo refurb
by
Deo
4 hours, 3 minutes ago -
DBOS Advanced Network Analysis
by
Kathy Stevens
15 hours, 5 minutes ago -
Microsoft Edge Launching Automatically?
by
healeyinpa
5 hours, 30 minutes ago -
Google Chrome to block admin-level browser launches for better security
by
Alex5723
17 hours, 45 minutes ago -
iPhone SE2 Stolen Device Protection
by
Rick Corbett
10 hours, 1 minute ago -
Some advice for managing my wireless internet gateway
by
LHiggins
5 hours, 42 minutes ago -
NO POWER IN KEYBOARD OR MOUSE
by
HE48AEEXX77WEN4Edbtm
11 hours, 57 minutes ago -
A CVE-MITRE-CISA-CNA Extravaganza
by
Nibbled To Death By Ducks
1 day, 3 hours ago -
Sometimes I wonder about these bots
by
Susan Bradley
23 hours, 32 minutes ago -
Does windows update component store “self heal”?
by
Mike Cross
13 hours, 35 minutes ago -
Windows 11 Insider Preview build 27858 released to Canary
by
joep517
1 day, 17 hours ago -
Pwn2Own Berlin 2025: Day One Results
by
Alex5723
1 hour, 9 minutes ago -
Windows 10 might repeatedly display the BitLocker recovery screen at startup
by
Susan Bradley
4 hours, 50 minutes ago -
Windows 11 Insider Preview Build 22631.5409 (23H2) released to Release Preview
by
joep517
1 day, 19 hours ago -
Windows 10 Build 19045.5912 (22H2) to Release Preview Channel
by
joep517
1 day, 19 hours ago -
Kevin Beaumont on Microsoft Recall
by
Susan Bradley
1 day, 8 hours ago -
The Surface Laptop Studio 2 is no longer being manufactured
by
Alex5723
2 days, 4 hours ago -
0Patch, where to begin
by
cassel23
1 day, 22 hours ago -
CFPB Quietly Kills Rule to Shield Americans From Data Brokers
by
Alex5723
2 days, 17 hours ago -
89 million Steam account details just got leaked,
by
Alex5723
2 days, 5 hours ago -
KB5058405: Linux – Windows dual boot SBAT bug, resolved with May 2025 update
by
Alex5723
3 days, 2 hours ago -
A Validation (were one needed) of Prudent Patching
by
Nibbled To Death By Ducks
2 days, 17 hours ago -
Master Patch Listing for May 13, 2025
by
Susan Bradley
2 days, 4 hours ago -
Installer program can’t read my registry
by
Peobody
1 hour, 21 minutes ago -
How to keep Outlook (new) in off position for Windows 11
by
EspressoWillie
2 days, 14 hours ago -
Intel : CVE-2024-45332, CVE-2024-43420, CVE-2025-20623
by
Alex5723
2 days, 22 hours ago -
False error message from eMClient
by
WSSebastian42
3 days, 13 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.