I have a MS Excel workbook with several worksheets.
Users are directed to this spreadsheet using a hyperlink in an e-mail.
Is there any way of expressing the hyperlink for getting the spreadsheet to open on a particular worksheet?
|
I have a MS Excel workbook with several worksheets. Users are directed to this spreadsheet using a hyperlink in an e-mail. Is there any way of expressing the hyperlink for getting the spreadsheet to open on a particular worksheet? | |||
|
feedback
|
This question came from our site for professional and enthusiast programmers.
|
Form the link like so: | |||
feedback
|
|
I don't think that there is a way to do this directly. A hyperlink can open a workbook, but it will always open to the sheet and cell that were selected when it was saved. You could add a contents sheet with hyperlink formulas to the other sheets
You will need to make sure that the workbook is save with the Contents sheet selected. | |||
|
feedback
|
|
You could write a macro in VBA:
| |||
|
feedback
|
|
Done the trick - nice one! Form the link like so: http://path/to/Workbook.xls#SheetName!a1 link|flag | |||
|
feedback
|
|
This worked for me in Excel 2007: I named the exact cell I wanted to open (by just selecting it and then typing the new name in the Name Box, which can be found to the top left). Then the hyperlink goes [filename with full path]#[cellname] obviously without the brackets. E.g. http://pathpart1/pathpart2/workbook.xlsm#OpeningCell "OpeningCell" would be the name I'd given to the cell. Note that it didn't matter which worksheet I was on when I last saved the file. With the hyperlink set up like this I get to the exact cell every time. I hope this helps. | |||
|
feedback
|