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 2003 - IF Statement, Form Field Calculate



 
 
Thread Tools Display Modes
  #11  
Old August 28th, 2009, 06:34 AM posted to microsoft.public.word.tables
Graham Mayor
external usenet poster
 
Posts: 18,297
Default Word 2003 - IF Statement, Form Field Calculate

You can have a dollar sign \# "$,0" or for cents too \# "$,0.00"
All this and more is covered at
http://www.gmayor.com/formatting_word_fields.htm

--

Graham Mayor - Word MVP

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



Stacy Birk wrote:
Thank you both so very much for your help and time. You both are
fantastic.

Doug, this works. The ' \# 0 ' is for formatting right? I am trying
to understand the logic so I know for next time. And having said that
the field would not have a dollar sign and should. Am I S.O.L.? or do
I have options for including a dollar sign?

Stacy



  #12  
Old August 28th, 2009, 03:42 PM posted to microsoft.public.word.tables
Stacy Birk
external usenet poster
 
Posts: 9
Default Word 2003 - IF Statement, Form Field Calculate

Thank you both for your reply.

macropod - I have your 'math zip' file on my system, I have referred
to it before. Thank you for providing that information.

Graham Mayor - I have added your links for referrals in the future.

Forgive my ignorance here but in the links nor in the math.zip did I
find a point of reference when using the formula with an integer at
the end, such as the '150' that is in the above formula. The
following formulas I have tried and both returned the !Syntax Error,
$:

{=MAX({=D19*D21\# "$,0"}, 150)}

{=MAX({=D19*D21\#$#,##0}, 150)}

Possibly I am overlooking something here but I am not for certain
what. I appreciate the help.

  #13  
Old August 29th, 2009, 02:43 AM posted to microsoft.public.word.tables
macropod[_2_]
external usenet poster
 
Posts: 2,402
Default Word 2003 - IF Statement, Form Field Calculate

Hi Stacy,

using the '\# 0' within the embedded field simply tells Word to strip off the currency formatting for the purposes of the MAX test.
Since it seems you'll want the displayed result to have the currency formatting, code the field this way:
{=MAX({=D19*D21 \# 0 },150) \# $,0}
or
{=MAX({=D19*D21 \# 0.00 },150) \# $,0.00}
depending on whether any decimals might be involved. The comma after the $ sign inserts the thousands separator - delete it if you
don't want one.

--
Cheers
macropod
[Microsoft MVP - Word]


"Stacy Birk" wrote in message ...
Thank you both for your reply.

macropod - I have your 'math zip' file on my system, I have referred
to it before. Thank you for providing that information.

Graham Mayor - I have added your links for referrals in the future.

Forgive my ignorance here but in the links nor in the math.zip did I
find a point of reference when using the formula with an integer at
the end, such as the '150' that is in the above formula. The
following formulas I have tried and both returned the !Syntax Error,
$:

{=MAX({=D19*D21\# "$,0"}, 150)}

{=MAX({=D19*D21\#$#,##0}, 150)}

Possibly I am overlooking something here but I am not for certain
what. I appreciate the help.


  #14  
Old September 1st, 2009, 04:42 PM posted to microsoft.public.word.tables
Stacy Birk
external usenet poster
 
Posts: 9
Default Word 2003 - IF Statement, Form Field Calculate

macropod!

Thank you so very much for your help. You do not know how much it is
appreciated. The final result that you offered works like a charm.

Side question: When working with field formulas such as we did within
this post, if spaces are not part of the end results, do spaces matter
when trying to get to a result? For example: This is the formula -
{=MAX({=D19*D21 \# 0 },150) \# $,0} (notice space after D21, after #
and after 0) as opposed to using: {=MAX({=D19*D21\#0},150)\# $,0} .

You are wonderful. Thank you again.

Stacy
  #15  
Old September 1st, 2009, 11:17 PM posted to microsoft.public.word.tables
macropod[_2_]
external usenet poster
 
Posts: 2,402
Default Word 2003 - IF Statement, Form Field Calculate

Hi Stacy,

The correct use of spaces between the expressions in a formula field can be critical. For the space between an expression and a
picture switch, though, I don't believe it is. Thus:
{=MAX({=D19*D21 \# 0 },150) \# $,0}
{=MAX({=D19*D21 \#0 },150) \#$,0}
{=MAX({=D19*D21\# 0 },150)\#$,0}
all give the same result, but
{=MAX({=D19*D21\# 0 },150)\#$ ,0}
will produce a syntax error. If you need spaces etc withing the formatted output, you need to enclose the numeric formatting within
double quotes. For example:
{=MAX({=D19*D21\# 0 },150) \# "$ ,0"}

--
Cheers
macropod
[Microsoft MVP - Word]


"Stacy Birk" wrote in message ...
macropod!

Thank you so very much for your help. You do not know how much it is
appreciated. The final result that you offered works like a charm.

Side question: When working with field formulas such as we did within
this post, if spaces are not part of the end results, do spaces matter
when trying to get to a result? For example: This is the formula -
{=MAX({=D19*D21 \# 0 },150) \# $,0} (notice space after D21, after #
and after 0) as opposed to using: {=MAX({=D19*D21\#0},150)\# $,0} .

You are wonderful. Thank you again.

Stacy


  #16  
Old September 3rd, 2009, 08:18 PM posted to microsoft.public.word.tables
Stacy Birk
external usenet poster
 
Posts: 9
Default Word 2003 - IF Statement, Form Field Calculate

Afternoon macropod!

Your explanation is most helpful. And is greatly appreciated.

Have a fantastic day,
Stacy


 




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 12:08 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.