A word formula using a cell reference cannot differentiate between 0 and empty. However, it can be done if the ranges are bookmarked and you test the bookmark contents. The easiest way to do that is to use formfields for the data entry in a document using forms protection. That also gives you the advantage of being able to use the formfields' 'calculate on exit' property to auto-update the calculations.
In a generalised sense, the calculation field to evaluate the content is:
{IF{REF MyFld} = {=MyFld} "{MyFld} is Numeric" "{MyFld} is Text"}}
where 'MyFld' is the formfield's internal bookmark name.
Thus, for your purposes, the field might be coded as:
{IF{REF Text1} = {=Text1} {IF{REF Text2} = {=Text2} {={Text1}-{=Text2} \# "+0,00;-0,00;0,00"}}}
where 'Text1' & 'Text2' are the formfields' internal bookmark names.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|