写一个if语句 [英] writing a if statement
问题描述
对于报告,我们提供以下代码: =格式([Diagnosis21-5],"#。##")&格式([诊断21-6],"#。##")&格式([诊断21-7],"#。##")&格式([诊断21-8],"#。##")
我们有时会注意到,第二个"#" "有时小数点右边为空。 什么/怎么写if语句有一个" " (一个空格)当第二个#为空或没有任何数字时...
感谢您的输入。
allen
Allen H
原始数据中可能还有一个其他白色字符的空格。 尝试使用TRIM
函数删除多余的字符
=格式(修剪
([Diagnosis21 -5]),"#。##")&格式(修剪
For a report, we have the following code : =Format([Diagnosis21-5],"#.##") & Format([Diagnosis21-6],"#.##") & Format([Diagnosis21-7],"#.##") & Format([Diagnosis21-8],"#.##")
We notice sometimes, the second "#" right of the decimal point is null sometimes. what/how to write the if statement to have a " " (one blank space) when the second # is null or don't have any number...
Thanks for your input.
allen
Allen H
You may have a space of other white character in you original data. Try using the TRIM
function to remove the extra character=Format(Trim
([Diagnosis21-5]),"#.##") & Format(Trim
这篇关于写一个if语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!