写一个if语句 [英] writing a if statement

查看:112
本文介绍了写一个if语句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于报告,我们提供以下代码:        =格式([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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆