Re: Need Excel AppleScript for Office 2004 for Macintosh
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