Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Applescript > Microsoft Excel...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 1579 of 1612
Post > Topic >>

Microsoft Excel 2008 and Applescript

by UnisonMac <Uni@[EMAIL PROTECTED] > Feb 25, 2008 at 11:01 AM

Hi,

I have a sheet that contains data from column A to column N. Column O  
makes a sum of datas from column A to column N.

When I add datas for some rows, I want my script to copy the sum in 
previous row to next row.

The following script does the job fine but for only one row. I have to 
execute the script many times for many rows.

tell application "Microsoft Excel"
	activate workbook
	set lastRowCellN to (get end range ("N" & (count rows)) direction 
toward the top)
	set lastRowNumN to (first row index of lastRowCellN)
	set lastRowCellNN to range ("N" & lastRowNumN)
	set lastRowCellO to (get end range ("O" & (count rows)) direction 
toward the top)
	set lastRowNumO to (first row index of lastRowCellO)
	set lastRowCellOO to range ("O" & lastRowNumN)
	select range ("O" & lastRowNumO)
	copy range range ("O" & lastRowNumO)
	paste worksheet active sheet destination range ("O" & lastRowNumO + 1)
	select range ("O" & lastRowNumO + 1)
	clear outline range ("O" & lastRowNumO)
end tell

Can you help me, please, to make this script working for many rows at 
the same time?
Please excuse for my English. I hope my message is clear.
Thanks for your help.

Bernard




 2 Posts in Topic:
Microsoft Excel 2008 and Applescript
UnisonMac <Uni@[EMAIL   2008-02-25 11:01:28 
Re: Microsoft Excel 2008 and Applescript
UnisonMac <Uni@[EMAIL   2008-02-27 05:53:20 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat May 17 13:41:21 CDT 2008.