View Single Post
  #2   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default IF field with a formula

Use

{ IF { Text67 } 0 { = { Text66 } / { Text67 } * { Text68 } \#
..00;-0.00; } "" }

It does not have to be in a formfield, but for Text66, Text67 and Text68 you
will need to check the Calculate on Exit box.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
"Kima & Greg Schwend" wrote in message
...
I have a table that contains form fields that are bookmarked. I want
to use an IF field to prevent a divide by zero error and to display
the result of an equation.

The fields are defined as number fields and bookmarked Text66, Text67,
and Text68.

The formula is =Text66/Text67*Text68

The formula works if I don't use the IF statement. But I want to
display nothing if Text67 is blank or 0.

{ IF Text67 0 =Text66/Text67*Text68 \# "0.00" ""}

This just displays =Text66/Text67*Text68 if Text67 is greater than 0.
I've tried to use an extra set of brackets to contain the true result
(by pressing ctrl+F9) but that doesn't work, nor does containing the
true result with quotes.

How can I display my true result as a number and not text?

Thanks