Hi Roger,
First off, copy the field with the calculations (i.e. the field after 'Days Difference:'
from the topic titled 'Calculate the # Days Difference Between Two Dates' and paste it
into the cell when you want the result to appear.
From what you originally posted, the date the report was issued is in Cell H2 in your
table. So, select that date and give in a bookmark, named 'StartDate' (use
Insert|Bookmark).
The next bit depends on whether you have a 'DATE' 'CREATEDATE' 'PRINTDATE' or 'SAVEDATE'
field in your table, showing the date you want the field to calculate up to. If you:
.. do have such a field, then select that date and give in a bookmark, named 'EndDate'
.. don't have such a field, then select the field with the calculations and press Shift-F9
to expose the coding. Now change the three instances of 'EndDate' to either (a) 'DATE'
'CREATEDATE' 'PRINTDATE' or 'SAVEDATE', according to which of these you want to use. These
are explained under 'date Field Basics' in the tutorial document.
Having done the above, select the field with the calculations and press F9 to update the
calculation.
As Graham said in his post, bookmark names must be unique. So, if you have more than one
calculation in your document, you'll need to edit the 'StartDate' bookmarks *and* the
formula field references to suit. You might use a convention like Graham suggested or you
could incorporate the cell reference into the bookmark name, using something like
''H2Date', for example.
Cheers
--
macropod
[MVP - Microsoft Word]
| Macropod,
|
| Thanks for getting back to me and the link to your tutorial. I downloaded it
| and read it through but am stuck on how exactly to actually do what you talk
| about in the document. For example the document states the following:
|
| "One of the limitations of Word's formula handling in tables is its
| inability to evaluate text strings, including dates. To get around this, you
| need to bookmark the contents of the affected cells (not the cells
| themselves) and reference those bookmarks (instead of the cells) in the
| formulae. The following table demonstrates how to do this using ASK fields
| to create the bookmarks:"
|
| I have no idea how to bookmark the contents of a cell and use ASK fields to
| accomplish what I need to do. Could you please point me to somewhere on how
| exactly I would go about doing this. Thanks so much for your help with this.
|
| Roger
|
| | > Hi Roger,
| >
| > Word's equivalent to Excel's NOW() function is a DATE field. However, even
| > with that you can't simply use something like
| > {={DATE}-H2}.
| >
| > To see how to do this calculation and just about everything else you might
| > want to do with dates in Word, check out my Date Calc
| > 'tutorial', at:
| >
http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Number=249902
| > In particular, look at the items titled 'Calculate the # Days Difference
| > Between Two Dates' and 'Date Calculations in a Table'.
| >
| > Cheers
| >
| > --
| > macropod
| > [MVP - Microsoft Word]
| >
| >
| > | > | Hi Folks,
| > |
| > | I have a word document with a table that I use to track open reports. In
| > one
| > | of the columns I have the date the report was issued and in another
| > column I
| > | report the aging of the report by manually calculating the number of
| > days
| > | from the date the report was issued to the current date. I would like to
| > use
| > | a formula like you can do so in Excel to do this automatically. I
| > assumed I
| > | would use a formula like this: NOW() - H2. However when I tried that I
| > got a
| > | syntax error. Any ideas on what I am doing wrong in constructing this
| > | formula? Also, is there a easy way to tell what cell you are currently
| > | working in? Any and all help will be greatly appreciated.
| > |
| > | Roger Tregelles
| > | Quality Assurance Engineer
| > | Respironics Inc.
| > |
| > |
| >
| >
|
|