Last active
March 31, 2018 16:17
-
-
Save zkarpinski/9719072 to your computer and use it in GitHub Desktop.
VBA Script to Google a seleciton of cells within excel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'Microsoft Excel Macros Master Module | |
'Community collaboration of macros for Microsoft Excel 2010 and 2013. | |
Attribute VB_Name = "Master_Module" | |
Public Sub GoogleIt() | |
'Google searches each item in selection | |
Attribute GoogleIt.VB_Description = "Google searches each item in selection" | |
Dim itemList, item As Variant | |
Dim ie As Object | |
itemList = Application.Selection | |
Set ie = CreateObject("InternetExplorer.Application") | |
ie.Visible = True | |
For Each item In itemList | |
ie.Navigate2 "https://www.google.com/search?q=" & item, 4096 '4096 = navOpenInBackgroundTab | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment