ragu1086 wrote:
trying to clear content of cells, and keep the formula
A short script can clear all the content in a selected range of cells except formulas, which are left intact.
- Copy-paste the script below into Script Editor (in Applications > Utilities folder).
- Select a range of cells in Numbers, some of which contain data while other have formulas.
- With the cells selected, click the triangle 'run' button in Script Editor.
It's always best to make a copy of your work before performing an operation like this, just in case you do the wrong thing or change your mind.
SG
tell application "Numbers"
tell front document to tell active sheet
tell (first table whose selection range's class is range)
set selRng to selection range
repeat with aCell in selRng's cells
tell aCell to if its formula is missing value then ¬
set its value to ""
end repeat
end tell
end tell
end tell