Hi, I’m a pure beginner but I found a script on this forum to help me find a blank cell in a worksheet. It asks the script to search for “” as the empty cell. This works if the cell is blank by formula (ie it has =“” as it’s formula) but doesn’t seem to understand a truly empty cell. How should I refer to these cells?
Here’s the script:
set startrange to 0.0
set endrange to 9999.0
set answer1 to text returned of (display dialog “New Job Number” default answer “Enter number”)
if endrange is greater than answer1 and answer1 is greater than startrange then
set answer2 to text returned of (display dialog “Ok” default answer “Now enter the customer name”)
end if
tell application “Microsoft Excel”
open “Macintosh HD:Users:Billy:Documents:Accounts:Job and invoice numbers:JIN2009-2010.xlsx”
set TargetRange to column 3 of the active sheet
set AfterCell to cell “C1” in the active sheet
set FoundRange to find TargetRange what “” after AfterCell look in values look at whole search direction search next
set the value of FoundRange to answer1
end tell
Anyone help me?
Thanks, Billy