• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
So simple yet---I need help
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: So simple yet---I need help
      • From: Stan Cleveland <email@hidden>
  • Prev by Date: Re: Choose File Limited by File Extension OR Type ???
  • Next by Date: Re: Copy folder shell scripting
  • Previous by thread: Re: choose from list re-visited - again
  • Next by thread: Re: So simple yet---I need help
  • Index(es):
    • Date
    • Thread