Loading
Excel.Tips.Net ExcelTips (Menu Interface)

Dynamic Hyperlinks in Excel

Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Dynamic Hyperlinks in Excel.

You can create dynamic hyperlinks in Excel that act like HTML forms without having to know much at all about HTML. These hyperlinks can come in handy when using Excel as an interface to the Internet or to an internal Web.

As an example, let's create a Google search form. First, drop by Google.com and do a search for the keyword "Excel." Then, take a look at the URL in your browser's address bar. It may look something like this:

http://www.google.com/search?hl=en&q=Excel&lr=lang_en

Of course, what you see in the address bar could be even longer, depending on what server you end up accessing at Google:

http://www.google.com/#hl=en&sugexp=ldymls&xhr=t&q=Excel&cp=4
&pf=p&sclient=psy&site=&source=hp&aq=0&aqi=&aql=&oq=Exce&pbx=1
&bav=on.2,or.r_gc.r_pw.&fp=e28a97840bb57e9&biw=1311&bih=692

Regardless of the format shown in the address bar, if you study what you see, you'll start to recognize patterns. The parameters following either the question mark (?) or the hash mark (#) are the name-value pairs submitted by the HTML form. But, you don't need to know a whole lot about that. In this case, the main thing to consider is the search term, where "q" is the name of the parameter and "Excel" is the value.

Using the HYPERLINK function along with the CONCATENATE function (or just the ampersand, &), you can easily assemble a link and create a dynamic form using cells as fields. Just follow these two quick steps:

  1. In cell B3 enter the keyword "Excel Web Queries."
  2. In cell B4, enter the following formula:
=HYPERLINK("http://www.google.com/search?q="&B3&"&safe=active","Search Google")

Now you have your own simple HTML form inside of Excel. You can create much longer hyperlinks and include multiple cell references, but there is a limit in Excel to how long the hyperlink can be (about 248 characters). To use the form, just enter your keywords into cell B3 and click on the hyperlink in cell B4. That's it!

Creating a form to access Google is just a simplistic example. The interesting applications are when you can assemble hyperlinks from the results of calculations, string manipulation, IF statements, combo boxes, or the other form fields available in Excel.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2445) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Dynamic Hyperlinks in Excel.

Related Tips:

Save Time and Supercharge Excel! Automate virtually any routine task and save yourself hours, days, maybe even weeks. Then, learn how to make Excel do things you thought were simply impossible! Mastering advanced Excel macros has never been easier. Check out Excel 2010 VBA and Macros today!

 

Comments for this tip:

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form below!)

Leave your own comment:

*Name:
Email:
  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*Text:
*What is 3+4? (To prevent automated submissions and spam.)
 
          Commenting Terms
 
 

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us

 

Advertise with Us

Our Privacy Policy

Our Sites

Tips.Net

Beauty and Style

Cars

Cleaning

Cooking

DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2013)

Gardening

Health

Home Improvement

Money and Finances

Organizing

Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2013)

Our Products

Premium Newsletters

Helpful E-books

Newsletter Archives

 

Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2014 Sharon Parq Associates, Inc.