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. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|