How do I select non contiguous Numbers spreadsheet cells using applescript?

Solution 1:

Try the following:

set thisColor to {32767, 32766, 32767}
set theseCells to {"A1", "A5", "B2", "C4"}

tell application "Numbers"
    activate
    if not (exists document 1) then make new document
    tell the active sheet of the front document to set thisTable to ¬
        make new table with properties {row count:5, column count:3}
    tell thisTable
        set the width of its columns to 30
        set the height of its rows to 30
        set the background color of its cells to {65535, 65535, 65535}
        repeat with aCell in theseCells
            set the background color of cell aCell to thisColor
        end repeat
    end tell
end tell