by UnisonMac <Uni@[EMAIL PROTECTED]
>
Feb 27, 2008 at 05:53 AM
On 2008-02-25 11:01:28 -0500, UnisonMac <Uni@[EMAIL PROTECTED]
> said:
> 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
OK. I found a solution. The script now works fine. Please, don't spend
your time to find a solution.
Bernard