Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
 
Posts: n/a
Default Calculation in Word Form

I have a Word form that contains a calulation that adds all of the content in
a table row. That was easy enough, by using the =SUM(ABOVE) expression for
the cell that the total goes in.

Now I need to add a cell that contains a discount, so that cell needs to be
subtracted from the others? Is there a simple calculation for that? Can the
number in the cell be added as a begative number?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
macropod
 
Posts: n/a
Default Calculation in Word Form

Hi Jon,

Sure can! If you press Alt-F9 to expose your document's field codes, your
existing field should appear, looking like:
{=SUM(ABOVE)}
If your discount is a fixed percentage, you could simply multiply the sum by
the equivalent decimal. For example:
{=SUM(ABOVE)*0.1}
will show a 10% discount, whilst
{=SUM(ABOVE)*0.9}
will show the final amount after deducting the 10% discount.

Now, suppose you've got an existing total that you want to keep, and you
want to show the discount on the next line, and the final amount on the line
below that. In this case, your discount lime could become:
{=-SUM(ABOVE)/2*0.1}
to show the discount as a -ve amount, and
{=-SUM(ABOVE)/2/1.9*0.9}
to show the final amount.

If your discount is something other than 10%, you'll have to play around
with the '1.9' and '0.9' in the last equation. Basically, the '1.9' is
replaced by 2 minus the amount of the discount and the '0.9' is replaced by
1 minus the amount of the discount.

For more information on calculations in Word, check out my Word Field Maths
'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/show...?Number=365442

Cheers


" wrote
in message ...
I have a Word form that contains a calulation that adds all of the content

in
a table row. That was easy enough, by using the =SUM(ABOVE) expression for
the cell that the total goes in.

Now I need to add a cell that contains a discount, so that cell needs to

be
subtracted from the others? Is there a simple calculation for that? Can

the
number in the cell be added as a begative number?



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
 
Posts: n/a
Default Calculation in Word Form

That's a great tip, but it doesn't quite respond to my own situation. The
discount isn't a percentage - it's a su. In other words the fields would look
like:

SUM
SUM
DISCOUNTED SUM
SUM
SUM
TOTAL

So if the fields we
1.00
1.00
2.00
1.00
1.00
TOTAL = 2.00

The total is $2.00 because I've added rows 1,2,4 and 5 aand subtracted row 3.

How can I accomplish this? Can I make row 3 a negative number?

"macropod" wrote:

Hi Jon,

Sure can! If you press Alt-F9 to expose your document's field codes, your
existing field should appear, looking like:
{=SUM(ABOVE)}
If your discount is a fixed percentage, you could simply multiply the sum by
the equivalent decimal. For example:
{=SUM(ABOVE)*0.1}
will show a 10% discount, whilst
{=SUM(ABOVE)*0.9}
will show the final amount after deducting the 10% discount.

Now, suppose you've got an existing total that you want to keep, and you
want to show the discount on the next line, and the final amount on the line
below that. In this case, your discount lime could become:
{=-SUM(ABOVE)/2*0.1}
to show the discount as a -ve amount, and
{=-SUM(ABOVE)/2/1.9*0.9}
to show the final amount.

If your discount is something other than 10%, you'll have to play around
with the '1.9' and '0.9' in the last equation. Basically, the '1.9' is
replaced by 2 minus the amount of the discount and the '0.9' is replaced by
1 minus the amount of the discount.

For more information on calculations in Word, check out my Word Field Maths
'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/show...?Number=365442

Cheers


" wrote
in message ...
I have a Word form that contains a calulation that adds all of the content

in
a table row. That was easy enough, by using the =SUM(ABOVE) expression for
the cell that the total goes in.

Now I need to add a cell that contains a discount, so that cell needs to

be
subtracted from the others? Is there a simple calculation for that? Can

the
number in the cell be added as a begative number?




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor
 
Posts: n/a
Default Calculation in Word Form

If these are form fields in the table, I would approach this from another
angle. Each form field will have its own bookmark property. Let's assume
Text1 to Text5 here. With Text3 the number to be subtracted.
In the 'total' cell I would enter a calculation

{=({Text1} + {Text2} - {Text3} + {Text4} + {Text5}) \# "$,0.00"}

Check the calculate on exit property of the last form field that contributes
to the calculation.
If you enter a minus amount (-2) in the Text3 form field, all the operators
can be +.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




wrote:
That's a great tip, but it doesn't quite respond to my own situation.
The discount isn't a percentage - it's a su. In other words the
fields would look like:

SUM
SUM
DISCOUNTED SUM
SUM
SUM
TOTAL

So if the fields we
1.00
1.00
2.00
1.00
1.00
TOTAL = 2.00

The total is $2.00 because I've added rows 1,2,4 and 5 aand
subtracted row 3.

How can I accomplish this? Can I make row 3 a negative number?

"macropod" wrote:

Hi Jon,

Sure can! If you press Alt-F9 to expose your document's field codes,
your existing field should appear, looking like:
{=SUM(ABOVE)}
If your discount is a fixed percentage, you could simply multiply
the sum by the equivalent decimal. For example:
{=SUM(ABOVE)*0.1}
will show a 10% discount, whilst
{=SUM(ABOVE)*0.9}
will show the final amount after deducting the 10% discount.

Now, suppose you've got an existing total that you want to keep, and
you want to show the discount on the next line, and the final amount
on the line below that. In this case, your discount lime could
become: {=-SUM(ABOVE)/2*0.1}
to show the discount as a -ve amount, and
{=-SUM(ABOVE)/2/1.9*0.9}
to show the final amount.

If your discount is something other than 10%, you'll have to play
around with the '1.9' and '0.9' in the last equation. Basically, the
'1.9' is replaced by 2 minus the amount of the discount and the
'0.9' is replaced by 1 minus the amount of the discount.

For more information on calculations in Word, check out my Word
Field Maths 'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/show...?Number=365442

Cheers


"
wrote in message
...
I have a Word form that contains a calulation that adds all of the
content in a table row. That was easy enough, by using the
=SUM(ABOVE) expression for the cell that the total goes in.

Now I need to add a cell that contains a discount, so that cell
needs to be subtracted from the others? Is there a simple
calculation for that? Can the number in the cell be added as a
begative number?



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
macropod
 
Posts: n/a
Default Calculation in Word Form

Hi Jon,

Graham's given you one solution that would certainly work with if you're
using formfields in a document protected for forms.

Even if you're not using such a document, you certainly can use negative
numbers in calculations, and SUM(ABOVE) would do the job just fine for a
table like the one you've described. Things start getting more difficult if
you need sub-totals, but not horribly so. In that case you'd have to rely
the same kinds of formulae you might use in Excel, except that Word doesn't
use '$' symbols to signify absolute references - table cell references in
Word are absolute anyway.

Cheers


" wrote
in message ...
That's a great tip, but it doesn't quite respond to my own situation. The
discount isn't a percentage - it's a su. In other words the fields would

look
like:

SUM
SUM
DISCOUNTED SUM
SUM
SUM
TOTAL

So if the fields we
1.00
1.00
2.00
1.00
1.00
TOTAL = 2.00

The total is $2.00 because I've added rows 1,2,4 and 5 aand subtracted row

3.

How can I accomplish this? Can I make row 3 a negative number?

"macropod" wrote:

Hi Jon,

Sure can! If you press Alt-F9 to expose your document's field codes,

your
existing field should appear, looking like:
{=SUM(ABOVE)}
If your discount is a fixed percentage, you could simply multiply the

sum by
the equivalent decimal. For example:
{=SUM(ABOVE)*0.1}
will show a 10% discount, whilst
{=SUM(ABOVE)*0.9}
will show the final amount after deducting the 10% discount.

Now, suppose you've got an existing total that you want to keep, and you
want to show the discount on the next line, and the final amount on the

line
below that. In this case, your discount lime could become:
{=-SUM(ABOVE)/2*0.1}
to show the discount as a -ve amount, and
{=-SUM(ABOVE)/2/1.9*0.9}
to show the final amount.

If your discount is something other than 10%, you'll have to play around
with the '1.9' and '0.9' in the last equation. Basically, the '1.9' is
replaced by 2 minus the amount of the discount and the '0.9' is replaced

by
1 minus the amount of the discount.

For more information on calculations in Word, check out my Word Field

Maths
'tutorial', at:
http://www.wopr.com/cgi-bin/w3t/show...?Number=365442

Cheers


"

wrote
in message ...
I have a Word form that contains a calulation that adds all of the

content
in
a table row. That was easy enough, by using the =SUM(ABOVE) expression

for
the cell that the total goes in.

Now I need to add a cell that contains a discount, so that cell needs

to
be
subtracted from the others? Is there a simple calculation for that?

Can
the
number in the cell be added as a begative number?






Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to put graphics on envelopes? Steve Koenig Microsoft Word Help 21 April 29th 23 02:47 AM
How do I insert a data entry prompt in a form letter? Hutch Microsoft Word Help 3 March 30th 06 06:04 AM
Word should allow to 'divide' page by 3 or 4, not just 2 CandasK Page Layout 2 February 28th 06 10:16 PM
Envelope Address GR New Users 5 April 24th 05 09:48 PM
creating forms Fluffypink Microsoft Word Help 4 March 9th 05 04:17 PM


All times are GMT +1. The time now is 06:21 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"