Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I create a link to another sheet in Numbers?

Numbers Version 3.5.2 (2118)

MacBook Pro with Retina display, OS X Yosemite (10.10)

Posted on Mar 8, 2015 2:18 PM

Reply
Question marked as Best reply

Posted on Mar 8, 2015 2:31 PM

Hi Pravine,


If the sheet is in the same document you can type "=" ant then navigate to that sheet and table and click on the cell you want.


If the sheet is in another document, you can't do that.


quinn

23 replies

Mar 8, 2015 4:19 PM in response to Pravine

When I click something I would like it to automatically go to the sheet I assign it to. I have many sheets and want the links to send me there when I click it.


Hi Pravine,


You can enter hyperlinks in Numbers to web pages. But you can't link to cells within Numbers. Using AppleScript, it is possible to jump to a specific cell. But that isn't as handy as just clicking a link, which I understand is what you are looking for.


SG

Mar 8, 2015 5:19 PM in response to t quinn

quinn,


I can't find the old scripts either. But something like this works in Numbers 3:


jumpTo(1, 1, 1, "A1")


to jumpTo(d, s, t, c)

tell application "Numbers"

tell document d

tell sheet s

tell table t

set selection range to cellc

end tell

end tell

end tell

end tell

end jumpTo



In the example the first 1 stands for front document, the second for sheet 1, the third for table 1.


Could call the handler with something like:


jumpTo("MyDocumentName", "MySheetName, "MyTableName", "A1")



SG

Mar 9, 2015 3:35 PM in response to SGIII

@quinn and Ian,


In case you are experimenting ....


You can jump to the specified target cell (in this document or another open document) by selecting a "link" cell in Table 2's column B and running the script. The script could be attached to a keyboard shortcut via an Automator Service.


User uploaded file

SG


--


property delim : "|" -- or whatever other delimiter you want to use in the "link" cell


try

set pv to parseCellValue(getTgt(), delim)

set {d, s, t, c} to {pv's item 1, pv's item 2, pv's item 3, pv's item 4}


jumpTo(d, s, t, c)

on error

display dialog "Can't jump. Check address of target." buttons "OK"

end try


to getTgt()

tell application "Numbers"

tell front document's active sheet

tell (first table whose selection range's class is range)

tell selection range to set theTgt to first cell's value

end tell

end tell

end tell

end getTgt


to jumpTo(d, s, t, c)

tell application "Numbers"

tell documentd'ssheets'stablet

set selection range to cellc

end tell

end tell

end jumpTo


to parseCellValue(tt, delim)

set AppleScript'stext item delimiters to delim

set dstc to tt's text items

return dstc

set AppleScript'stext item delimiters to ""

end parseCellValue

Mar 19, 2015 11:56 AM in response to SGIII

property delim : "|" -- or whatever other delimiter you want to use in the "link" cell


try

set pv to parseCellValue(getTgt(), delim)

set {d, s, t, c} to {pv's item 1, pv's item 2, pv's item 3, pv's item 4}


jumpTo(d, s, t, c)

on error

display dialog "Can't jump. Check address of target." buttons "OK"

end try


to getTgt()

tell application "Numbers"

tell front document's active sheet

tell (first table whose selection range's class is range)

tell selection range to set theTgt to first cell's value

end tell

end tell

end tell

end getTgt


to jumpTo(d, s, t, c)

tell application "Numbers"

tell documentd'ssheets'stablet

set selection range to cellc

end tell

end tell

end jumpTo


to parseCellValue(tt, delim)

set AppleScript'stext item delimiters to delim

set dstc to tt's text items

return dstc

set AppleScript'stext item delimiters to ""

end parseCellValue


With this code, can you highlight the parts which change depending on the documents, and perhaps I can have a look at it and figure out how to adapt it to mine, thanks.

Mar 19, 2015 12:09 PM in response to Pravine

Not sure what you are asking. Have you tried running the script?


The code is not what changes according to how your document is set up. What changes is the "link" that you would put in the cell:


So if want to link "to" cell A1 in a table named 'Table 1' in a sheet named 'Sheet 1' in a document named 'MyDocument', then this is what you would enter in the link cell (the cell you are linking "from"):


MyDocument.numbers|Sheet 1|Table 1|A1


Then you would click once on the cell where you have entered this "link," run the script, and Numbers will jump to the cell that the link points to.


If you want to have the "link" point to another cell, then revise what you put in the cell.


SG

Sep 4, 2015 2:32 PM in response to SGIII

Your script appears to be exactly what I need for navigating a large spreadsheet with many sheets. Unfortunatly I can't seem to make the script work for me, either in the large spreadsheet or in a small test using the example posted above. The error message comes up, indicating that the script isn't able to parse the cell into a link. I've tried changing to a different delimiter and re compiling with no luck. The Automator workflow "Jump to Sheet" from another thread works fine, so I don't think there is a problem with my system. I'm using OS 10.10.5 and Numbers 3.5.3. I'm hoping you can help me get this working.


Edit after more testing. For some reason the script works for me without the extension on the file name in the link cell. I'm back on track.


Lloyd Riford

Sep 6, 2015 7:26 AM in response to Lloyd Riford

Lloyd,


Glad to hear it's working for you. It can be a little tricky because the document, sheet, and table names have to be exactly right. Not sure why it wouldn't work on your machine when you include the .numbers extension.


I tend to use the "Jump to Sheet" Automator Service more because it usually gets me close to where I want to go without much fuss.


SG

How do I create a link to another sheet in Numbers?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.