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
-
Woody
by
Scott
6 hours, 18 minutes ago -
24H2 has suppressed my favoured spider
by
Davidhs
6 hours, 20 minutes ago -
GeForce RTX 5060 in certain motherboards could experience blank screens
by
Alex5723
20 hours, 30 minutes ago -
MS Office 365 Home on MAC
by
MickIver
14 hours, 19 minutes ago -
Google’s Veo3 video generator. Before you ask: yes, everything is AI here
by
Alex5723
1 day, 10 hours ago -
Flash Drive Eject Error for Still In Use
by
J9438
1 day, 12 hours ago -
Windows 11 Insider Preview build 27863 released to Canary
by
joep517
2 days, 5 hours ago -
Windows 11 Insider Preview build 26120.4161 (24H2) released to BETA
by
joep517
2 days, 5 hours ago -
AI model turns to blackmail when engineers try to take it offline
by
Cybertooth
1 day, 9 hours ago -
Migrate off MS365 to Apple Products
by
dmt_3904
1 day, 9 hours ago -
Login screen icon
by
CWBillow
1 day ago -
AI coming to everything
by
Susan Bradley
9 hours, 37 minutes ago -
Mozilla : Pocket shuts down July 8, 2025, Fakespot shuts down on July 1, 2025
by
Alex5723
2 days, 21 hours ago -
No Screen TurnOff???
by
CWBillow
2 days, 21 hours ago -
Identify a dynamic range to then be used in another formula
by
BigDaddy07
2 days, 22 hours ago -
InfoStealer Malware Data Breach Exposed 184 Million Logins and Passwords
by
Alex5723
3 days, 9 hours ago -
How well does your browser block trackers?
by
n0ads
2 days, 19 hours ago -
You can’t handle me
by
Susan Bradley
18 hours, 41 minutes ago -
Chrome Can Now Change Your Weak Passwords for You
by
Alex5723
2 days, 12 hours ago -
Microsoft: Over 394,000 Windows PCs infected by Lumma malware, affects Chrome..
by
Alex5723
3 days, 20 hours ago -
Signal vs Microsoft’s Recall ; By Default, Signal Doesn’t Recall
by
Alex5723
3 days ago -
Internet Archive : This is where all of The Internet is stored
by
Alex5723
3 days, 21 hours ago -
iPhone 7 Plus and the iPhone 8 on Vantage list
by
Alex5723
3 days, 21 hours ago -
Lumma malware takedown
by
EyesOnWindows
3 days, 9 hours ago -
“kill switches” found in Chinese made power inverters
by
Alex5723
4 days, 6 hours ago -
Windows 11 – InControl vs pausing Windows updates
by
Kathy Stevens
4 days, 6 hours ago -
Meet Gemini in Chrome
by
Alex5723
4 days, 10 hours ago -
DuckDuckGo’s Duck.ai added GPT-4o mini
by
Alex5723
4 days, 10 hours ago -
Trump signs Take It Down Act
by
Alex5723
4 days, 18 hours ago -
Do you have a maintenance window?
by
Susan Bradley
2 days, 23 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.