Hi all,
I’m trying to write a script that displays a dialogue which the user then adds a reference that will be located in an open Excel Spreadsheet. The script searches thru the cells in column C2:C3000 and filters to find the row containing the reference input by the dialog. Then, once the row is located for the script to show another dialogue where the user enters text - this is then deposited in Cell AM of the found row.
the below is as far as I can get using on line resources. I get it to compile but it simply doesn’t work. Any pointers greatly received.
tell application "Microsoft Excel"
activate
set myDialog to display dialog "Enter filter text for column C:" default answer ""
set filterText to text returned of myDialog
set activeSheet to active sheet
set columnC to range "C2:C3000" of activeSheet
select columnC
set hidden of column 3 of activeSheet to true
set visible of columnC to true
set autofiltermode to false
set autofiltermode to true
set filterRange to range "C:C" of activeSheet
select filterRange
set value of filterRange to filterText
set myDialog to display dialog "Enter text for cell AM:"
set cellText to text returned of myDialog
set AMCell to range "AM1" of activeSheet
set value of AMCell to cellText
set autofiltermode to false
set visible of columnC to true
end tell