Hello,
I am new to AppleScript and i want to develop some macros for Excel.
I have a range name, and only its name. I do not know its position on the sheet. I do not know the number of rows and columns within the range. I want to test if there is something in each cells. if there is something, i will copy the value somewhere else and exit when i reach the first void cell.
Someone can help me with this ?
Browser: Safari 525.27.1
Operating System: Mac OS X (10.5)
Perhaps something like this
tell application "Microsoft Excel"
set myRange to range "myNamedRange" of active sheet
repeat with i from 1 to count of cells in myRange
set oneCell to cell i of myRange
if value of oneCell = "target" then
display dialog "Found in " & (get address of oneCell)
else
if length of (value of oneCell as text) = 0 then
exit repeat
end if
end if
end repeat
end tell
Many thanks,
This script works quite well. How can I only refer to the cells of the first column of the range ?