Using an AppleScript to Copy Formulas
A more reusable approach would be a simple AppleScript that replicates the Copy command but only copies the bare formulas:
on join(cells, delimiter)
set previousDelimiters to AppleScript's text item delimiters
set AppleScript's text item delimiters to delimiter
set resultString to (cells as text)
set AppleScript's text item delimiters to previousDelimiters
return resultString
end join
on getSelectedFormulas()
set tab to character id 9
set lf to character id 10
tell application "Numbers"
tell document 1's sheet 1's table 1
tell selection range
set {min, max} to {column 1's address, column -1's address}
set formulaRows to {}
repeat with aRow in rows
set formulaCells to {}
repeat with aCell in aRow's cells min thru max
set formulaCells to formulaCells & (aCell's formula)
end repeat
set formulaRows to formulaRows & ¬
my join(formulaCells, tab)
end repeat
return my join(formulaRows, lf)
end tell
end tell
end tell
end getSelectedFormulas
on run()
tell application "Numbers"
set the clipboard to my getSelectedFormulas()
end tell
end run
(Note: I’m the author of the script; it’s under the ISC open source license.)
This also eliminates the need to modify the original formulas.
Binding the script to a keyboard shortcut
In order to bind this script to a keyboard shortcut in Numbers, open Automator.app to create an Automator workflow. Choose the option Service receives no input in Numbers, create a single Run AppleScript step and paste the AppleScript code there.
Save the workflow under the name Copy Formulas
, then open System Preferences and click on Keyboard, then Keyboard Shortcuts » Services » Numbers » Copy Formulas. Configure a keyboard shortcut; I’d recommend ⌥⇧⌘C because you’re probably going to use it often with its counterpart, Paste and Match Style, which already has the shortcut ⌥⇧⌘V.
⌥⇧⌘C
as mentioned. It will also appear as a menu item in Numbers » Services if using the mouse is more your thing. How more »direct« would you want it to be?