Button with link url based on cell

mrjebennett

New Member
Joined
May 15, 2019
Messages
1
Hello. I am trying to figure out a way to have a single button send the user to google based on the content of a cell.

For example. If F1 has JANE DOE... then once the button is pushed it would send the user to google and JANE DOE would already be in the search.

I would think a simple google string as such (https://www.google.com/search?q=jane+doe) would suffice. Is this possible?


Thanks!
 

Some videos you may like

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

daverunt

Well-known Member
Joined
Jul 9, 2009
Messages
1,793
Office Version
2013
Platform
Windows
Hi,

Here's one method with very basic code.

This relies on the user selecting the cell with the search term/name in then pressing the button to which this macro is assigned.

Code:
Sub Make_hyperlink()


bLink = "https://www.google.com/search?q="
uLink = ActiveCell.Value

hLink = bLink & uLink


ThisWorkbook.FollowHyperlink (hLink)

End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,099,134
Messages
5,466,866
Members
406,506
Latest member
Patb3

This Week's Hot Topics

Top