How to do a google search of data from multiple cells

pickless

New Member
Joined
Apr 17, 2012
Messages
1
I am creating a tool inventory sheet and would like to have a link, button, etc. to do a Google search of the combined cells (B2, D2, E2). Where i can select any single row, and it would perform the search.
Example: the function would open google and search Craftsman 47517 7/8". Then be able to research that tool.
Capture.JPG


I hope that makes sense. I actually was able to record a macro earlier, which did it. However, I cant seem to duplicate macro now, and I couldn't figure out how to get it to run from any row I select. Then I removed that macro in the process. Help, please!

Thanks in advance
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hello
I'm a beginner in this kind of stuff, but some time ago I did something similar for myself.
In a separate column you have to concatenate the necessary cells to create the search term. In your case
Excel Formula:
=CONCATENATE(B2&" "& D2&" "& E2 )
Pull the formula down for the rows you need.
Select the desired cell and run the code.

VBA Code:
Sub test()
Dim IE As Object
Dim rngMyRange As Range
Dim cell As Range

Set rngMyRange = Selection

For Each cell In rngMyRange.Cells
    Set IE = CreateObject("InternetExplorer.Application")
    IE.navigate ("http://www.google.com/search?q=" & cell)
    IE.Visible = True
Next cell
End Sub

If you select multiple cells, multiple web browsers will open simultaneously, one for each selected cell.
Works for whatever you select in the sheet.
PS: Sorry for my English ...
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,726
Members
448,987
Latest member
marion_davis

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