A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Word Formula using IF



 
 
Thread Tools Display Modes
  #21  
Old April 8th, 2008, 11:38 PM posted to microsoft.public.word.tables
Cameron.Crest
external usenet poster
 
Posts: 3
Default Word Formula using IF

On Apr 8, 3:28*pm, "Cameron.Crest" wrote:
Graham,

I've got awordform I'm trying to create and I am getting a syntax
error in the main calcualation field.

The form is for creating proposals/quotes of security services.
I'm trying to get the calculation to tell me what the cost will be for
a client based on the contents of a dropdown form field. *All form
fields are calculating on exit.

Here's an outline:

Form field: DropdownRow1 has 2values: Armed, Unarmed (armed is
chosen)
Form field: Unarmed_Rate has a value of $21.00
Form field: qty1 has a value of 2 (thats 2 Officers)

Here's the calculation syntax:
{ =IF{ DropdownRow1 }="Armed" "{ =unarmed_rate+10 }"
"{ =unarmed_rate }"}

Here's the error
!Syntax Error, ARMED

What am I doing wrong?


PS: Ignore the qty1 field.
  #22  
Old April 8th, 2008, 11:56 PM posted to microsoft.public.word.tables
macropod
external usenet poster
 
Posts: 1,231
Default Word Formula using IF

Hi Cameron,

As the error message said, you have a Syntax Error (ie you've coded the field wrongly). Try:
{={unarmed_rate}+{IF{DropdownRow1}= "Armed" 10 0}}

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------

"Cameron.Crest" wrote in message ...
Graham,

I've got a word form I'm trying to create and I am getting a syntax
error in the main calcualation field.

The form is for creating proposals/quotes of security services.
I'm trying to get the calculation to tell me what the cost will be for
a client based on the contents of a dropdown form field. All form
fields are calculating on exit.

Here's an outline:

Form field: DropdownRow1 has 2 values: Armed, Unarmed (armed is
chosen)
Form field: Unarmed_Rate has a value of $21.00
Form field: qty1 has a value of 2 (thats 2 Officers)

Here's the calculation syntax:
{ =IF{ DropdownRow1 }="Armed" "{ =unarmed_rate+10 }"
"{ =unarmed_rate }"}

Here's the error
!Syntax Error, ARMED

What am I doing wrong?







  #23  
Old April 9th, 2008, 12:11 AM posted to microsoft.public.word.tables
Cameron.Crest
external usenet poster
 
Posts: 3
Default Word Formula using IF

On Apr 8, 3:56*pm, "macropod" wrote:
Hi Cameron,

As the error message said, you have a Syntax Error (ie you've coded the field wrongly). Try:
{={unarmed_rate}+{IF{DropdownRow1}= "Armed" 10 0}}

Cheers
--
macropod
[MVP - Microsoft Word]
-------------------------



"Cameron.Crest" wrote in ...
Graham,


I've got a word form I'm trying to create and I am getting a syntax
error in the main calcualation field.


The form is for creating proposals/quotes of security services.
I'm trying to get thecalculationto tell me what the cost will be for
a client based on the contents of a dropdown form field. *All form
fields are calculating on exit.


Here's an outline:


Form field: DropdownRow1 has 2 values: Armed, Unarmed (armed is
chosen)
Form field: Unarmed_Rate has a value of $21.00
Form field: qty1 has a value of 2 (thats 2 Officers)


Here's thecalculationsyntax:
{ =IF{ DropdownRow1 }="Armed" "{ =unarmed_rate+10 }"
"{ =unarmed_rate }"}


Here's the error
!Syntax Error, ARMED


What am I doing wrong? - Hide quoted text -


- Show quoted text -


This worked like a charm.
I cut and pase your formula and re-constructed it by highlighting each
part with braces and pressing CTRL+F9 and removing the text braces.
After protecting the doc for form entry, bingo. Updates when I change
the dropdown and exit.

Thanks a million.

Cameron.
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.