So simple yet---I need help
So simple yet---I need help
- Subject: So simple yet---I need help
- From: Raymond P Reedy <email@hidden>
- Date: Thu, 24 Apr 2008 15:33:11 -0400
Excel 11.4.1 and OS X 10.4.11
I have a spreadsheet that may or may not have a number in column 2.
If the cell is empty, I want to delete it an shift cells left. In
debug and stepping thru it finds the empty cells but does not delete
nor shift left.
Here is my script...
tell application "Microsoft Excel"
activate
activate object worksheet "Sheet2"
set lastRowSheet2 to (get end range ¬
("A" & (count rows)) direction toward the top)
--How many rows?
set lastRowNum2 to (first row index of lastRowSheet2)
-- Actual row number of last row
repeat with i from 6 to lastRowNum2
set rng to value of range ("B" & i)
if rng = ""
then --
Find empty cell (no score) and delete (Shift left)
delete range range ("B" & i) shift left
end if
end repeat
end tell
Thanks,
Ray
Raymond P Reedy
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden