Pulling Data from Web based on VBA

leigh123

New Member
Joined
Jan 11, 2023
Messages
4
Hi, I am working on a code that will pull data from the web based on a specific cell in excel. I am very new to excel so I haven't gotten very far so any help is greatly appreciated!

Gist of what I would like it to do:
1. Review each line on the "Summary" tab in the attached excel
2. Based on If statement:
Scenario 1:
If column B equals, "R", then add line to next available line in the "Pricing" tab.
Line to consist of:
Column A = next number (starting with 1 then the next part will be labeled 2)
Column C= part # from "Summary" tab
Column D= description from "Summary" tab
Column E= qty from "Summary" tab
Column F= Go to "Ryobi" tab, search for part and get price and paste to "Pricing" tab
Column G= Column E*F= total
Column H= If Column B = M then will equal Milwaukee.. if R then equal Ryobi
Column I= Insert date and time pulled (including time zone)

Scenario 2:
If column B equals, "M", then go to website ("Part Number Lookup and Parts Pricing Calculator") and then click on "here" and download
1689260893418.png


After clicking on it, I would like to download and save a new workbook in the same folder as the Price List workbook as "Milwaukee Price". After saving, I would like to open it and extract the price for the parts that are labeled "M".
Line to consist of:
Column A = next number (starting with 1 then the next part will be labeled 2)
Column C= part # from "Summary" tab
Column D= description from "Summary" tab
Column E= qty from "Summary" tab
Column F= Get from "Milwaukee Price" workbook after saved. (Search for exact PN and get price)
Column G= Column E*F= total
Column H= If Column B = M then will equal Milwaukee.. if R then equal Ryobi
Column I= Insert date and time pulled (including time zone)

Price List Workbook (has 3 sheets)
1. Summary

1689261398216.png


2. Pricing

1689261450984.png


3. Ryobi

1689261497419.png
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

Forum statistics

Threads
1,223,896
Messages
6,175,260
Members
452,627
Latest member
KitkatToby

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