Calculations in Word tables

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Help!
What I'm trying to do is create a blank purchase
requisition form where in one cell you can put the
quantity; in the next cell to the right the price per
each; and have the next cell to the right give the total.
 
Dave,

Haven't you already asked this question?

For your form requirement see:
You should get a good start here and the linked articles by Dian Chapman:

http://word.mvps.org/faqs/customization/FillinTheBlanks.htm

That link will show you how to set up forms.

Your basic calculation is:

A1 B1 C1
5 $2.00 {=(a1*b1)}

The field code braces { } are entered with CTRL+F9. Toggle the field code
to display the result with ALT+F9. 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, toggling to and from print
preview (if "Update Fields" is checked in the File>Print>Options 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
 
Nothing I see here addresses my need.
-----Original Message-----
Dave,

Haven't you already asked this question?

For your form requirement see:
You should get a good start here and the linked articles by Dian Chapman:

http://word.mvps.org/faqs/customization/FillinTheBlanks.h tm

That link will show you how to set up forms.

Your basic calculation is:

A1 B1 C1
5 $2.00 {=(a1*b1)}

The field code braces { } are entered with CTRL+F9. Toggle the field code
to display the result with ALT+F9. 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, toggling to and from print
preview (if "Update Fields" is checked in the File>Print>Options 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


--
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
total.


.
 
Dave,

Your need, as you described it, was pretty simple. You want to enter a QTY
and Price and have a fomula provide you with a total.

How does

Cell A1 Cell B1 Cell C1
5 $2.00 {=(a1*b)} Or

Cell A1 Cell B1 Cell C1
5 $2.00 $10.00

not address your need?

What is it that you really need?
 
Hi Dave-

Just a thought, but have you considered using Excel for that purpose instead
of Word? Even if you aren't very familiar with the program, you might take a
look at the existing P.O. Template (depending on version). If it doesn't
meet your needs exactly, the template can be used to create a modified
version.

HTH |:>)


Nothing I see here addresses my need.

-- (e-mail address removed)
 
I haven't worked much in Excel and the bulk of the
information required for the proposed form does not need
the spreadsheet power of Excel. Most of the target users
are also more familiar with Word.
 
EXACTLY. Now, how do I determine what the cell numbers
are? I've tried watching the bottom of the form as I
move from cell to cell but see nothing like this.

Maybe I'm not familiar enough (yet) with the application.
Been using it for ten years now and every day I learn
something new.
 
In Word tables, the cells are addressed exactly as they are in Excel.
Columns start at 'A' and progress alphabetically; rows start at 1 and
progress numerically. So the top-left cell of any table is A1, immediately
below is cell A2 or immediately to its right is cell B1.

All the information that Greg gave you will create your VERY basic purchase
form. To make a proper Purchase form, use Excel.

--
Terry Farrell - Word MVP
http://word.mvps.org/

: EXACTLY. Now, how do I determine what the cell numbers
: are? I've tried watching the bottom of the form as I
: move from cell to cell but see nothing like this.
:
: Maybe I'm not familiar enough (yet) with the application.
: Been using it for ten years now and every day I learn
: something new.
:
: >-----Original Message-----
: >Dave,
: >
: >Your need, as you described it, was pretty simple. You
: want to enter a QTY
: >and Price and have a fomula provide you with a total.
: >
: >How does
: >
: >Cell A1 Cell B1 Cell C1
: >5 $2.00 {=(a1*b)} Or
: >
: >Cell A1 Cell B1 Cell C1
: >5 $2.00 $10.00
: >
: >not address your need?
: >
: >What is it that you really need?
: >
: >
: >
: >--
: >Greg Maxey/Word MVP
: >See:
: >http://gregmaxey.mvps.org/word_tips.htm
: >For some helpful tips using Word.
: >
: >Dave wrote:
: >> Nothing I see here addresses my need.
: >>> -----Original Message-----
: >>> Dave,
: >>>
: >>> Haven't you already asked this question?
: >>>
: >>> For your form requirement see:
: >>> You should get a good start here and the linked
: articles by Dian
: >>> Chapman:
: >>>
: >>>
: http://word.mvps.org/faqs/customization/FillinTheBlanks.h
: tm
: >>>
: >>> That link will show you how to set up forms.
: >>>
: >>> Your basic calculation is:
: >>>
: >>> A1 B1 C1
: >>> 5 $2.00 {=(a1*b1)}
: >>>
: >>> The field code braces { } are entered with CTRL+F9.
: Toggle the field
: >>> code to display the result with ALT+F9. 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,
: >>> toggling to and from print preview (if "Update
: Fields" is checked in
: >>> the File>Print>Options 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
: >>>
: >>>
: >>> --
: >>> Greg Maxey/Word MVP
: >>> See:
: >>> http://gregmaxey.mvps.org/word_tips.htm
: >>> For some helpful tips using Word.
: >>>
: >>> Dave wrote:
: >>>> Help!
: >>>> What I'm trying to do is create a blank purchase
: >>>> requisition form where in one cell you can put the
: >>>> quantity; in the next cell to the right the price per
: >>>> each; and have the next cell to the right give the
: total.
: >>>
: >>>
: >>> .
: >
: >
: >.
: >
 
Back
Top