View Single Post
  #2   Report Post  
Greg Maxey
 
Posts: n/a
Default

Papa,

The formula needs to me in a formula field. Enter the field code braces
{ } with CTRL+F9
Inside the field codes braces type the formula =(C1-D1)

It should look like this {=(C1-D1)} now right click the field and select
toggle field code. The result
$75.00 will appear if you have $100.00 entered in C1 and $25.00 entered in
D1.

Now all that being said, if you change C1 to say $90.00 the result in E1
won't change automatically. You have to update the field. There are
several ways to do that:

When a change is made, you can update the field by selecting the field and
pressing F9, or update all fields by pressing CTRL+a (selects all) and
pressing F9, or toggling to and from print preview (if "Update Fields" is
checked in the FilePrintOptions dialog box), or running a macro something
like:

Sub UpdateFields()
Dim oStory As Range
For Each oStory In ActiveDocument.StoryRanges
oStory.Fields.Update
If oStory.StoryType wdMainTextStory Then
While Not (oStory.NextStoryRange Is Nothing)
Set oStory = oStory.NextStoryRange
oStory.Fields.Update
Wend
End If
Next oStory
Set oStory = Nothing
End Sub

Another option is to use a protected form. With a protected form you can
set your variable fields to "calculate on exit" thereby updating result
fields when you tab from one text field to the next.

I you want to pursue this method, you should get a good start here and the
linked articles by Dian Chapman:

http://word.mvps.org/faqs/customizat...nTheBlanks.htm

Another option is to embed an Excel spreadsheet in you document instead of
trying to use Word functions.







1. The result does automatically or otherwise appears in E1. Thus,
how may I create a table using a formula that will calulate + $100.00
- $25.00 = $ 75.00 thought-out the table?