[英]How to round a value using field codes in MS Word 2010?
I am using field codes to dynamic calculate some things. 我正在使用域代码来动态计算一些东西。 Through an ASK field I am getting an value.
通过ASK字段,我获得了价值。
{ASK myvalue "Enter a value"}
Now I use this for some calculations and want to display it as a rounded value to a specified number of decimal places. 现在,我将其用于一些计算,并希望将其显示为四舍五入到指定位数的小数位。
{= ROUND(myvalue/575, 1) \* MERGEFORMAT}
If I do that it displays syntax error. 如果我这样做,它将显示语法错误。 There is no syntax error if I remove the ROUND function.
如果删除ROUND函数,则没有语法错误。
Has anybody an idea what the problem could be? 有谁知道可能是什么问题?
Has anybody an idea what the problem could be?
有谁知道可能是什么问题?
The most likely problem: Word wants you to use the same delimiter character as you have set in Windows Control Panel (Regional Options or whatever). 最可能的问题:Word希望您使用与Windows控制面板中设置的相同的定界符(区域选项或其他)。 The default US/UK English setting is ",", but many locales use ";".
美国/英国的默认英语设置为“,”,但是许多语言环境使用“;”。 In that case your formula would need to be
在这种情况下,您的公式将需要
{= ROUND(myvalue/575; 1) \* MERGEFORMAT}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.