Hi all,
I'm trying to find the simplest method to calculate the difference between two dates and express it as the number of days in a Word 2007 table cell.
For example: 'Issue Delta' (Cell A) was raised on the 22/09/2010 (cell B). Number of days the issue has been unresolved (cell C)
I'd like to find the number of days for cell C by comparing TODAY and 22/09/2010 (or another set date).
Unfortunately formulas in Word are a bit limited - and at that point we run into my knowledge barrier!
Any help gratefully received.
Just a little bit of VBA:
or reading from the tablesub snb() activedocument.tables(1).cell(1,3).range.text=datediff("d",cdate("22/09/2010"),date) end sub
sub snb() with activedocument.tables(1) .cell(1,3).range.text=datediff("d",cdate(left(.cell(1,2).range.text,len(.cell(1,2).range.text)-2),date) end with end sub
Last edited by snb; 07-11-2011 at 09:37 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks