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)
Numbers Version 3.5.2 (2118)
MacBook Pro with Retina display, OS X Yosemite (10.10)
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
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
I don't think I got my desired result. I would like it to act like a link. 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.
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
Hi SG,
I have been looking for your applescript for navigating sheets in 3. I thought it would give Pravine at least a little of the function he is looking for.
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
Hi SG and quinn,
Maybe you were looking for this discussion:
SGIII has posted a method to jump to a sheet using AppleScript on Automator
Regards,
Ian 🙂.
Hi Ian,
Thats what I was looking for. That should help.
quinn
@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.
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
Hi SG,
I am going to bookmark this so the next time someone needs it I can send them here.
Hopefully Pravine will stop by and give it a try.
quinn
I think SGII's post is closer to what I was looking for. However the code seems too complicated for me, can you explain it and tell me how I can use it in mine.
HAppy to help. But that's hard to without some specifics on what you are trying to do and how you have structured your documents.
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
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.
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
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
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?