AppleScript & Excel: Delete rows containing certain word
I am having to use Applescript to delete rows in excel containing "Delete" without removing rows containing "Delete (old)". I have a script but it keeps deleting "Delete" and "Delete (old)". Which I can not have. And if we can find a way to make the looks faster that would be a great bonus because this is really slow when I am using it for 1000 rows.
This is what I have so far...
tell application "Microsoft Excel"
activate
selectrange "A1"
set FoundResult to false
try
set FoundCell to (find range "1:350" what "Delete")
set FoundResult to true
deleteentire row of FoundCell
end try
set i to 1
repeat while i ≤ 350
try
set FoundCell to (find range "1:350" what "Delete")
set FoundResult to true
deleteentire row of FoundCell
end try
set i to i + 1
end repeat
end tell
iMac, Mac OS X (10.6.7), with Cinema Display