Hey all,
Script does:
selects cell A1
copies the formula to cell A1
tries to make it an array (holding down command and pressing return)
Issue:
- Right turn this script works except the command and return combo yields nothing since the cell is not selected.
– to enable an array in the cell you have to hold down command key and then press the return key in excel
How to:
- How do we select the cell so that the cursor is in the cell?
tell application "Microsoft Excel"
activate
set columnFormula to "=SUM((B1:B3<0))"
--Set formulas to cell
set the clipboard to columnFormula
select cell "A1"
tell application "System Events"
keystroke "v" using {command down}
keystroke (click)
keystroke return key using {command down}
end tell
end tell
desired result is: {=SUM((B1:B3<0))} assigned to the cell
TIA