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