How do I make a search so the user can click on cell A2 and it does a Google search for that text plus the text in the cell B2 next to it?
How do I make a search so the user can click on cell A2 and it does a Google search for that text plus the text in the cell B2 next to it?
This would require VBA, if possible. Shall I move the thread for you?
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
NB: as a Moderator, I never accept friendship requests.
Forum Rules (updated August 2023): please read them here.
Try this in the worksheet module
BSB![]()
Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Count = 1 Then If Not Intersect(Target, Range("A:A")) Is Nothing Then If Target.Row > 1 Then If Target <> "" And Target.Offset(, 1) <> "" Then ThisWorkbook.FollowHyperlink Address:="https://www.google.com/search?q=" & Target.Value & "+" & Target.Offset(0, 1).Value End If End If End If End If End Sub
@AliGW - Apologies, I hadn't refreshed the screen and seen your message above before posting.
BSB
That's OK - it's not a thread stopper! I'm going to move the thread, anyway.
I was hoping to do it without VBA but this will work. thanks guys!
A VBA free option would be to put hyperlinks in another column and use that to click on rather than column A.
For example, the below in C2 and copied down.
Formula:
=HYPERLINK("https://www.google.com/search?q="&A2&"="&B2)
This comes with the added maintenance of having to apply the formula to new rows of data, whereas the VBA option would account for that automatically.
There are probably other ways, but that's two options for ya.
BSB
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks