Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
add comment

migrated from stackoverflow.com Nov 1 '10 at 12:35

This question came from our site for professional and enthusiast programmers.

5 Answers

Form the link like so:

http://path/to/Workbook.xls#SheetName!a1

share|improve this answer
    
Excellent - this works. One thing to watch out for is if SheetName includes spaces, e.g., Sheet Name - make sure to form the link like this: path/to/Workbook.xls#'Sheet Name'!a1 –  Anonymous Sep 19 '08 at 6:50
    
This doesn't work for me. Browser downloads file to disk ignoring hashed param, open dialog in excel ignores it too. –  Frantisek Kossuth Dec 17 '12 at 14:41
add comment

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

=HYPERLINK("[Book1.xls]Sheet2!A10","My internal link text")

You will need to make sure that the workbook is save with the Contents sheet selected.

share|improve this answer
add comment

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.

share|improve this answer
add comment

You could write a macro in VBA:

Private Sub SetWorksheet()
Worksheets("Worksheet1").Activate
End Sub
share|improve this answer
add comment

Done the trick - nice one!

Form the link like so:

http://path/to/Workbook.xls#SheetName!a1 link|flag

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.