Question: I have created a hyperlink from one worksheet to another within the same file. But when the linked worksheet is pulled up, I want to populate the designated field with some text. The text will change depending on the hyperlink selected, but all the links will connect to the same worksheet and the same field. The field I am wanting to populate controls numerous lookup functions. HELP!! Can this be done? Answer: Yes, this can be done by utilizing macros on two Excel workbook "events". Let's take a look at an example. Download Excel spreadsheet (as demonstrated below) In our spreadsheet, there are two sheets called Hyperlinks and Destination. The Hyperlinks sheet contains three hyperlinks in cell A3, A6, and A9. All three hyperlinks point to cell B2 in the Destination sheet . |
When a hyperlink is clicked, the Destination sheet is activated and cell B2 will display text showing which hyperlink was selected. In our example below, we've selected "Hyperlink #1" in cell A3.
|
You can view the macros by pressing Alt-F11 and double-clicking on the ThisWorkbook object in the left window. There are three components to this solution:
Macro Code:The macro code looks like this:
|
Home | About Us | Our Services | Software | Spreadsheets Library | Excel Tutorials | Useful Links | Site Map | Contact Us
Unless otherwise stated, all images and text
Spreadsheet123
Meet advanced users of MS Excel and Spreadsheet and do not be shy to ask your question.
Visit our busy book shop, were you can find latest books for beginners as well as advanced users of excel and similar programs.
Spreadsheet 123 Spreadsheet Software Development
See Spreadsheets for:
a.Hotel Management
b.Personal Budget
c.Corporate Finance
d.Rating Calculation
e.Real Estate and Mortgage
f.Web Calc