Welcome toExcel.Tips.Net
Tips.Net Home
ExcelTips Home
Ask an Excel Question
Make a Comment
ExcelTips FAQ
ExcelTips Premium
Learn Access Now
Free Printable Forms
Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Legal Tips
Money Tips
Organizing Tips
Pest Tips
Pet Tips
Wedding Tips
Word2007 Tips
WordTips
Advertise on the
ExcelTips Site
Adding a Little Animation to Your Life
Converting a Range of URLs to Hyperlinks
Making the Formula Bar Persistent
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
The parameters following the question 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:
=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 versions: 97 2000 2002 2003 2007
Save Time! ExcelTips has been published weekly since late 1998. Past issues of ExcelTips are available in convenient ExcelTips archives. Have your own enhanced archive of ExcelTips at your fingertips, available to use at any time!