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 3 years, 1 month ago by
anonymous.
Tags: Excel gather web data
AuthorTopicViewing 2 reply threadsAuthorReplies-
woody
ManagerPosting 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 3 years, 1 month ago by
woody.
-
This reply was modified 3 years, 1 month ago by
-
Rick Corbett
AskWoody MVPMany 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
GuestI 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 3 years, 1 month 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
-
Humane shows off its futuristic ‘Ai Pin’ wearable
by
Alex5723
1 hour, 5 minutes ago -
Linux Mint 21.2 Cinnamon (Edge)
by
Alex5723
5 hours, 2 minutes ago -
What happened to Web Select?
by
John Harley
14 hours, 42 minutes ago -
StatCounter : Windows 11’s market share is unchanged and not going anywhere.
by
Alex5723
8 hours, 13 minutes ago -
How to view 1990’s files with graphics content. Lotus 123 .wk1/.FMT Harvard.DWG
by
Theodor Arrenbrecht
4 hours, 16 minutes ago -
macOS Sonoma can be installed on 83 unsupported Macs
by
Alex5723
16 hours, 31 minutes ago -
Unable to create home network connection between Win 7 and Win 10 machines
by
maddaze
38 minutes ago -
Entering pin to start windows 11 22h2
by
mike4381
18 hours, 57 minutes ago -
Version 1809/Server 2019 kb5030214 problem question?
by
69800
17 hours, 51 minutes ago -
Ghacks Author Filter
by
rdleib
17 hours, 12 minutes ago -
ZenRAT Malware Targets Windows Users Via Fake Bitwarden Password Manager
by
Alex5723
1 day, 1 hour ago -
Waterfox G just gets better and better
by
Ascaris
4 hours, 21 minutes ago -
Microsoft Backup triggers help-desk calls and confusion
by
Susan Bradley
2 hours, 54 minutes ago -
How Amazon ejected AI-written e-books from its bestseller lists
by
B. Livingston
12 hours, 59 minutes ago -
Ten stunning features in Microsoft Word
by
Peter Deegan
3 hours, 51 minutes ago -
Thunderbolt
by
Ed Tittel
18 hours, 45 minutes ago -
VeraCrypt updates
by
Alex5723
18 hours, 36 minutes ago -
A.I. and AskWoody
by
WCHS
1 day, 6 hours ago -
Where is Windows Update?
by
bsfinkel
4 hours, 35 minutes ago -
mailwasher
by
jferr333
1 day, 8 hours ago -
Windows Photos
by
Linda2019
1 day, 9 hours ago -
OT QuickBooks payroll module not letting you efile 941
by
Susan Bradley
1 day, 10 hours ago -
MSA logins have been retired from DPC May 1st
by
Cormy1
1 day, 10 hours ago -
Administrator Lock
by
John Monge
1 day, 14 hours ago -
Skype cancels loopback audio
by
Steven
1 day, 18 hours ago -
Python re-installation
by
WSepzcaw
1 day, 1 hour ago -
Finally updated to Thunderbird 115
by
EricB
3 hours, 54 minutes ago -
Hard drive boot up problem in Windows AND Linux
by
rkacmar
4 hours, 39 minutes ago -
WSUS fails to download monthly Cumulative Update for Windows 11 Version 22H2
by
Bruce23
1 day, 10 hours ago -
Excel tone
by
WSmmi16
12 hours, 48 minutes ago
Recent blog posts
- Microsoft Backup triggers help-desk calls and confusion
- How Amazon ejected AI-written e-books from its bestseller lists
- Ten stunning features in Microsoft Word
- Thunderbolt
- Wait for the bugs to be worked out
- MS-DEFCON 4: Is Windows 11 really a disaster?
- Windows 11, Surface, and Windows Copilot
- Why File Explorer keeps me on Windows
Key Links
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
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-2023 by AskWoody Tech LLC. All Rights Reserved.