
Signature
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,
>
[quoted text clipped - 32 lines]
> | Quality Assurance Engineer
> | Respironics Inc.
Graham Mayor - 22 Dec 2006 15:07 GMT
ASK fields are simply a way of gathering information to be saved in a
bookmark. If you are working with already entered data you don't need the
ASK fields
In this instance you select the date content of the cell and assign it to a
bookmark - Insert > Bookmark - and name it to match the field construction
i.e. StartDate
As you are comparing this with today's date, you can change the EndDate ref
field in the first item on page 9 - Calculate the # Days Difference Between
Two Dates - to a DATE field thus :
{={SET a{=INT((14-{Date \@ M})/12)}}{SET b{={Date \@ yyyy}+4800-a}}{SET
c{={Date \@ M}+12*a-3}}{SET d{Date \@
d}}{=d+INT((153*c+2)/5)+365*b+INT(b/4)-INT(b/100)+INT(b/400)-32045}-{SET
a{=INT((14-{StartDate \@ M})/12)}}{SET b{={StartDate \@ yyyy}+4800-a}}{SET
c{={StartDate \@ M}+12*a-3}}{SET d{StartDate \@
d}}{=d+INT((153*c+2)/5)+365*b+INT(b/4)-INT(b/100)+INT(b/400)-32045}\# ,0}
Thus with startdate being the date of your report eg
StartDate (your table cell content) = 12 December 2006
Days Difference:(from the above field construction) = 10
Note that bookmark names must be unique so if you have several entries, each
one must have a different bookmarkname, so you would have to change
'StartDate' to something different for each row e.g.
A_Startdate, B_StartDate etc.

Signature
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Macropod,
>
[quoted text clipped - 49 lines]
>>> Quality Assurance Engineer
>>> Respironics Inc.
macropod - 22 Dec 2006 22:08 GMT
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

Signature
macropod
[MVP - Microsoft Word]
| Macropod,
|
[quoted text clipped - 51 lines]
| > | Quality Assurance Engineer
| > | Respironics Inc.