VBA to scrape multiple pieces of data from a website and put into columns

jwalrath

New Member
Joined
May 25, 2016
Messages
10
Basically, I would like for the user to put in an item number in column B and then based on that part number it would automatically search the website www.grainger.com and get the following data and put it in the same row as the item number in the appropriate columns

Manufacturer in Column E
Manufacturer Model number in Column F
Title in Column G
Shipping weight in Column H
Price in Column I

For Example the search for:

Item Number 5MP76 would return the results (displayed in columns not as a row like below)

Manufacturer: DEWALT
Manufacturer Model Number: DW831
Title: 5" Angle Grinder, 12.0 Amps
Shipping Weight: 9.75
Price: 177.00

Assumptions/Requirements:

1) Row 1 will contain headers
2) Remove all formatting from data that is scraped
3) Remove $ from price and format as 00.00
4) Remove lbs. from weight
5) If data is unavailable the put the text "Data Unavailable" in the cell
6) If search results in no item then have a msg box appear stating "No Item Found"
7) Prefer to have this run in the background
8) This will run automatically when user enters the item number or changes the number
9) If the data in the Item Number cell is deleted it will clear the scraped data as well
10) user will be entering multiple rows of item numbers and I would like this to run for each item number entered individually not as a macro that is run at the end for all.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().

Forum statistics

Threads
1,214,915
Messages
6,122,214
Members
449,074
Latest member
cancansova

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top