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?
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
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
-
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
41 minutes ago -
Enabling Secureboot
by
ITguy
2 hours, 59 minutes ago -
Windows hosting exposes additional bugs
by
Susan Bradley
7 hours, 43 minutes ago -
No more rounded corners??
by
CWBillow
3 hours, 31 minutes ago -
Android 15 and IPV6
by
Win7and10
8 hours, 48 minutes ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
20 hours, 4 minutes ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
22 hours, 46 minutes ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
17 hours, 20 minutes ago -
Windows Update orchestration platform to update all software
by
Alex5723
1 day, 6 hours ago -
May preview updates
by
Susan Bradley
17 hours, 28 minutes ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
9 hours, 3 minutes ago -
Just got this pop-up page while browsing
by
Alex5723
22 hours, 17 minutes ago -
KB5058379 / KB 5061768 Failures
by
crown
19 hours, 21 minutes ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
3 hours, 54 minutes ago -
At last – installation of 24H2
by
Botswana12
1 day, 21 hours ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
8 hours, 39 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
2 days, 9 hours ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
8 hours, 15 minutes ago -
Limited account permission error related to Windows Update
by
gtd12345
2 days, 23 hours ago -
Another test post
by
gtd12345
2 days, 23 hours ago -
Connect to someone else computer
by
wadeer
2 days, 17 hours ago -
Limit on User names?
by
CWBillow
2 days, 21 hours ago -
Choose the right apps for traveling
by
Peter Deegan
2 days, 10 hours ago -
BitLocker rears its head
by
Susan Bradley
1 day, 18 hours ago -
Who are you? (2025 edition)
by
Will Fastie
1 day, 17 hours ago -
AskWoody at the computer museum, round two
by
Will Fastie
2 days, 13 hours ago -
A smarter, simpler Firefox address bar
by
Alex5723
3 days, 9 hours ago -
Woody
by
Scott
3 days, 19 hours ago -
24H2 has suppressed my favoured spider
by
Davidhs
1 day, 18 hours ago -
GeForce RTX 5060 in certain motherboards could experience blank screens
by
Alex5723
4 days, 9 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.