Home » excel » vba – Setting clickable anchor links within Excel

vba – Setting clickable anchor links within Excel

Posted by: admin May 14, 2020 Leave a comment

Questions:

This might be a VBA thing, but I honestly don’t know.

I have a summary tab that pulls aggregated data from other tabs in the workbook. I’d like the end-user to be able to click on different areas (not necessarily just cells with formulas in them) and Excel jumps to a set location within the workbook, but on a different worksheet. For example, clicking on a client’s name on the summary tab might activate the “Billing” tab and jump to where that client’s billing begins.

Basically, this is the Excel version of an HTML anchor to jump to another section. I know turning off the “Edit directly in cell” option does this to a certain degree, but this is for the application as a whole, not a setting on an individual workbook. I’d like to have tighter control over the functionality, as opposed to making users mess with their settings.

Is this even possible?

How to&Answers:

Here’s one option – Work with Hyperlinks in Excel:

Create a hyperlink to a specific location in a workbook

  1. To link to a location in the current workbook or another workbook, you can either define a name for the destination cells or use a cell reference.

    • To use a name, you must name the destination cells in the destination workbook.
  2. On a worksheet of the source workbook, click the cell where you want to create a hyperlink.

    You can also select an object, such as a picture or an element in a chart, that you want to use to represent the hyperlink.

    You can also right-click the cell or object and then click Hyperlink on the shortcut menu, or you can press Ctrl+K.

  3. Under Link to, do one of the following:

    • To link to a location in your current workbook, click Place in This Document.

    • To link to a location in another workbook, click Existing File or Web Page, locate and select the workbook that you want to link to, and then click Bookmark.

  4. Do one of the following:

    • In the Or select a place in this document box, under Cell Reference, click the worksheet that you want to link to, type the cell
      reference in the Type in the cell reference box, and then click OK.

    • In the list under Defined Names, click the name that represents the cells that you want to link to, and then click OK.

  5. In the Text to display box, type the text that you want to use to represent the hyperlink.

  6. To display helpful information when you rest the pointer on the
    hyperlink, click ScreenTip, type the text that you want in the
    ScreenTip text box, and then click OK.