Word 2003 calculated field

E

el gecko verde

running word 2003, have a calcualted field to show percentage of change
between two user-entered text fields in same document. expresion is
"=(Text13 - Text14) / Text13" works fine when change is negative (e.g., Text
13 is 50 and Text14 is 25, for a 50% reduction), fails when change is
positive. any thoughts? i don't know how to program for absolute value of
the numerator in the expression; or maybe there's a better way altogether.
 
D

DaveLett

You might be able to use something like the following:

{ = ABS(Text13-Text14)/Text13 \# 0.00 }

HTH,
Dave
 
P

Pesach Shelnitz

Hi,

You can use an IF field to test whether Text13 is greater than Text14 and
add nested fields to do the calculations as follows.

{If {Text13} > {Text14} "a {=({Text13} - {Text14})/{Text13}*100 \# "0%"}
reduction" "a {=({Text14}/{Text13})*100 \# "0%"} increase"}

To create these nested fields, copy the above without the any of the curly
brackets ({}). Then for each pair of curly brackets, select the code and
press Ctrl+F9.
 
E

el gecko verde

thanks so much, dave - worked perfectly. do you happen to know if all of the
math functions that are available in excel also work in calculated fields in
word?
 
D

DaveLett

Hi,
I'm using Word 2007. When I navigate the Help TOC to Automatiion and
Programmability>Field Codes>Field codes in Word, I can select the = (Formula)
field. That then allows me to dig a little deeper into the functions that are
available in the formula field, which is much smaller than the number of
formulas in Excel (from what I can see in the help)

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top