'ショートカットに登録すると人によっては便利です。
'選択セル内容をgoogle検索する
Sub Google()
Dim myword As String
Dim myurl
myword = Selection(1).Value
'urlの時はそのまま表示
If Left(Trim(myword), 4) = "http" Then
myurl = Trim(myword)
'それ以外はGoogle検索
Else
myurl = "https://www.google.co.jp/search?q=" & UrlEncodeUtf8(myword)
End If
CreateObject("wscript.shell").Run myurl
End Sub
'URL文字列をUtf8でエンコードする関数
Function UrlEncodeUtf8(ByRef strSource As String) As String
Dim objSC As Object
Set objSC = CreateObject("ScriptControl")
objSC.Language = "Jscript"
UrlEncodeUtf8 = objSC.CodeObject.encodeURIComponent(strSource)
Set objSC = Nothing
End Function