Macro for entering a specfic reference from a spreadsheet, entering into a search field in a website, selecting the search button and returning the ou

Nilsjohanekman

New Member
Joined
Nov 19, 2016
Messages
8
Dear Community,

Can you please help me create a macro that does the following?:


  • Enter a specific reference from a spreadsheet
  • Enter it into the search field in a website
  • Select the search button
  • Return the output back into a new spreadsheet

FYI... this is where I curently am (A lot of googling, not enough understanding)"

'Prepare for retrieval of Data


Set Sht = Sheets("MasterPullTab")
RowCount = 1
Sht.Range("A" & RowCount) = "PO"
Sht.Range("B" & RowCount) = "Item"
Sht.Range("C" & RowCount) = "Supplier Part Number"
Sht.Range("D" & RowCount) = "Qty"
Sht.Range("E" & RowCount) = "Priority"
Sht.Range("F" & RowCount) = "Status"


eRow = Sheet3.Cells(Rows.Count, 1).End(x1Up).Offset(1, 0).Row


myPOtype = InputBox("Enter PO")

'Select BPP hyperlink
With ieApp
.navigate "https://www.myboeingfleet.com/partpage"

Do While .Busy Or _
.ReadyState <> 4
DoEvents
Loop

Set what = .document.getElementsByName("textfield")
what.Item(0).Value = myPOtype

.document.getElementsByClass("paddingtopone").Click


Do While .Busy Or _
.ReadyState <> 4
DoEvents
Loop

For Each ele In .document.all

Select Case ele.vAlignName
Case "top"
RowCount = RowCount + 1

End Select
Next ele

Select Case ele.className
Case "TableCellTitle"
Sht.Range("A" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("B" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("C" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("D" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("E" & RowCount) = ele.innerText
Case "TableCellTitle"
Sht.Range("F" & RowCount) = ele.innerText

End Select


End With

Set ieApp = Nothing

End Sub

Thanks in advance!

Regards,
Nilsjohanekman
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,216,458
Messages
6,130,754
Members
449,588
Latest member
accountant606

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