Scripts
Insert Specified Value into Selected Cells
var Numbers = Application ("Numbers");
Numbers.includeStandardAdditions = true;
// get the selected cells
var tables = Numbers.documents[0].activeSheet.tables;
var ranges = tables.selectionRange.name();
for(var tableNum in ranges) {
var thisRange = ranges [tableNum];
if (thisRange != null) break;
}
var range = tables[tableNum].ranges[thisRange];
var cells = range.cells;
// set all cells to the date
for(var i=0;i<cells.length;i++) {
cells [i].value = "smol compute";
}
tables [tableNum].selectionRange = range;Replace "smol compute" with the desired values.
Last updated
Was this helpful?