• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

8. Forms and Fields > 72. Perform Calculations with Formula Fields

Perform Calculations with Formula Fields

You can do a surprising amount of number crunching without resorting to an Excel spreadsheet. This hack introduces you to Word’s formula fields.

Formula fields let you calculate and compare numbers, but not text. This hack shows you one way around this limitation.

The syntax for a formula field follows:

{=Formula 
            [Bookmark] 
            [\# Numeric Picture]}

For example, the following set of fields asks you to enter a number, assigns the number to a bookmark named MyNum, and then uses a formula field to calculate the square of the number:

{ QUOTE { ASK "Enter a Number" MyNum } { =MyNum^2 } }

To get the square of a different number, select the field and press F9.

To create this field, or any of the fields shown in this hack, press Ctrl-F9 or select InsertField for each set of braces in the field (most of the fields in this hack use several nested fields), and then fill in the field codes as shown. Line breaks are included to aid in readability, but they are not required for the fields to work properly.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint