All,
I have a question regarding the code below.
Sub test()
Dim w As Worksheet
Dim cell As Range
Dim strSearch As Range
Dim lastCell As Range
Dim bc As Range
Columns("A").Replace what:=" ", replacement:="+", SearchOrder:=xlByColumns
Set w = ThisWorkbook.Sheets("Sheet1")
Set strSearch = w.Range("A1:A" & Range("A" & w.Rows.Count).End(xlUp).Row)
With strSearch
Set lastCell = .Cells(.Cells.Count)
End With
For Each cell In strSearch
With ActiveSheet.QueryTables.Add(Connection:="URL;https://www.google.com/search?q=" & strSearch, _
Destination:=Range("b1"))
.BackgroundQuery = True
.TablesOnlyFromHTML = True
.Refresh BackgroundQuery:=False
.SaveData = True
End With
Next
End Sub
*this is test code at the moment
the way the data is returned by this query is what i copied in below.
596 Triport Road, Georgetown, KY 40324
(502) 863-7575
Company Information Human Resources
www.aichiforge.com/company-info.html www.aichiforge.com/login.asp
Company Information. Company History. April 2009 - Aichi USA ... Aichi Forge USA, Inc, is one of the few forging companies in the ...
Contact Us Products
www.aichiforge.com/contact-us.html www.aichiforge.com/products.html
Contact Us. Aichi Forge USA, Inc. 596 Triport Road Georgetown ... Products. Custom forged complex engineered applications ...
More results from aichiforge.com »
1 2 3 4 5 6 7 8 9 10 Next
The data I am looking for is in those results. I would need the phone number and website information.
What I need to know is there a way to just return that information or put it into one cell so I could go through and extract just the data I need? Also I will need this query to run down a list of company names that will return the same pieces of data, however I have not gotten that far yet as I am stuck.
thank you for looking into this for me.
thank you,
Nic
Bookmarks