• 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
Re: Need Excel AppleScript for Office 2004 for Macintosh
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Need Excel AppleScript for Office 2004 for Macintosh


  • Subject: Re: Need Excel AppleScript for Office 2004 for Macintosh
  • From: deivy petrescu <email@hidden>
  • Date: Mon, 1 Oct 2007 20:22:34 -0400


On Oct 1, 2007, at 16:59, Raymond P Reedy wrote:

Resend with correction. Range should be A1:AZ1

This task is a little over my head with Microsoft Office 2004 and AppleScript.

I have an Excel sheet with fifty-two columns and three hundred rows. Each row has been populated weekly, but not all rows received data. Thus I have empty cells in some rows. Thus A1 thru J1 looks like this for example...

50 25 empty 35 49 empty 29 42 empty 45

and A2 thru J2 like this...

empty 38 empty 25 46 38 empty 40 16 30

What I need to do with the script is make A1 thru J1 look like this...

50 25 35 49 29 42 45 empty empty empty

and A2 thru J2 like this...

38 25 46 38 40 16 30 empty empty empty

In other words, shift cell data left until there are no empty cells between populated cells. I would like to do this with range A1:AZ1, stopping when A1 thru T1 (the left 20 columns) have been populated and ALL empty cells, if any, are at the right end of the row.

Then when this works, I want to loop through all 300 rows.

Way over my head. Any help would be appreciated.

Thanks,

RayR

Raymond P Reedy
email@hidden

Raymond ;
I have office X so I can not tell you the whole story.
Stan gave you a good start. However it might take a while for it to run.
In office X, I can not test this new approach because it apparently does not work (a bug), but it might in office 2004.
There is an option with PasteSpecial that is SkippingBlnks.
You can copy a whole table and then paste skipping blanks.
That reduces your loop from a bunch to 1.
Try it with 2004, or Stan might be able to do it.



Deivy

Deivy
_______________________________________________
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: Need Excel AppleScript for Office 2004 for Macintosh
      • From: Stan Cleveland <email@hidden>
References: 
 >Need Excel AppleScript for Office 2004 for Macintosh (From: Raymond P Reedy <email@hidden>)

  • Prev by Date: PowerPoint script error : "Microsoft PowerPoint got an error: Can't make class picture. (-2710)"
  • Next by Date: Re: Need Excel AppleScript for Office 2004 for Macintosh
  • Previous by thread: Re: Need Excel AppleScript for Office 2004 for Macintosh
  • Next by thread: Re: Need Excel AppleScript for Office 2004 for Macintosh
  • Index(es):
    • Date
    • Thread