WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Word 2003 - IF Statement, Form Field Calculate

 
Goto page Previous  1, 2
   Home -> Office -> Tables RSS
Next:  formatting DATA bars  
Author Message
Stacy Birk

External


Since: Aug 25, 2009
Posts: 9



(Msg. 9) Posted: Thu Aug 27, 2009 12:03 pm
Post subject: Re: Word 2003 - IF Statement, Form Field Calculate [Login to view extended thread Info.]
Archived from groups: microsoft>public>word>tables (more info?)

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
Back to top
Login to vote
macropod

External


Since: Jul 02, 2008
Posts: 746



(Msg. 10) Posted: Thu Aug 27, 2009 7:05 pm
Post subject: Re: Word 2003 - IF Statement, Form Field Calculate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Stacy,

Yes, the '\# 0' is a "numeric picture switch" (in Word parlance). There's more on field switches in Word's help file.

To see how manage field formatting and perform a wide range of calculations in Word, check out my Word Field Maths Tutorial, at:
http://www.wopr.com/index.php?showtopic=365442
or
http://www.gmayor.com/downloads.htm#Third_party

--
Cheers
macropod
[Microsoft MVP - Word]


"Stacy Birk" <sbirkhome.DeleteThis@gmail.com> wrote in message news:7d9203cc-0dfe-4ed3-ac33-31eac36c6f43@j21g2000yqe.googlegroups.com...
> Thank You, Doug! Both you and macropod are amazing!
>
> From what I can tell the ' \ # 0' is a formatting switch of some
> sort?
>
> Also, side question - on various forums around here I notice the
> formula written sometimes has spaces, sometimes does not - do spaces
> matter when writing a formula such as you all did above? Just curious
> on that.
>
> Thank you again you two - I am extremely grateful to the assistance.
>
> Stacy
Back to top
Login to vote
Graham Mayor

External


Since: Jul 04, 2006
Posts: 8385



(Msg. 11) Posted: Fri Aug 28, 2009 2:05 am
Post subject: Re: Word 2003 - IF Statement, Form Field Calculate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
Back to top
Login to vote
Stacy Birk

External


Since: Aug 25, 2009
Posts: 9



(Msg. 12) Posted: Fri Aug 28, 2009 7:42 am
Post subject: Re: Word 2003 - IF Statement, Form Field Calculate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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.
Back to top
Login to vote
macropod

External


Since: Jul 02, 2008
Posts: 746



(Msg. 13) Posted: Fri Aug 28, 2009 10:05 pm
Post subject: Re: Word 2003 - IF Statement, Form Field Calculate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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" <sbirkhome.DeleteThis@gmail.com> wrote in message news:f8e79046-118b-409e-9307-66dc43421401@d15g2000prc.googlegroups.com...
> 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.
>
Back to top
Login to vote
Stacy Birk

External


Since: Aug 25, 2009
Posts: 9



(Msg. 14) Posted: Tue Sep 01, 2009 8:42 am
Post subject: Re: Word 2003 - IF Statement, Form Field Calculate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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
Back to top
Login to vote
macropod

External


Since: Jul 02, 2008
Posts: 746



(Msg. 15) Posted: Tue Sep 01, 2009 7:05 pm
Post subject: Re: Word 2003 - IF Statement, Form Field Calculate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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" <sbirkhome RemoveThis @gmail.com> wrote in message news:d6aacf17-7905-42d4-a7b9-00f0251a8cf8@g1g2000pra.googlegroups.com...
> 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
Back to top
Login to vote
Stacy Birk

External


Since: Aug 25, 2009
Posts: 9



(Msg. 16) Posted: Thu Sep 03, 2009 12:18 pm
Post subject: Re: Word 2003 - IF Statement, Form Field Calculate [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Afternoon macropod!

Your explanation is most helpful. And is greatly appreciated.

Have a fantastic day,
Stacy
Back to top
Login to vote
Display posts from previous:   
       Home -> Office -> Tables All times are: Eastern Time (US & Canada) (change)
Goto page Previous  1, 2
Page 2 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
  Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support