Microsoft Excel copying date question


I am trying to copy the date from one cell in Microsoft Excel 2004 and paste it into the cell directly below it. This script doesn’t work and simply places “msng” into the cell that I want to copy the date to.

set InterestDate to date of active cell
select (get offset active cell row offset 1)
set formula r1c1 of active cell to InterestDate

I haven’t been able to find a simple way to do this. Alternatively, is there a simple way to copy the contents of a cell and then paste them in another cell using Applescript? The copy / paste method might be preferrable, especially if the format were copied as well, as it would be if you were not using Applescript.

Thanks in advance for the help,

Tom Carlson

Hi Jacques,

Thanks for the solution to my problem (again). I did have to make one correction. Using

set value of (get offset active cell row offset 1) to InterestDate

got hung up. I changed this line into two lines

select (get offset active cell row offset 1)
    set value of active cell to InterestDate

which worked.

This little bit comprised the last couple of lines of Applescript in a 25 line script for entering two rows of data in a spreadsheet with lots of repetitive data between the rows. It now works perfectly.

Thank you,