简体   繁体   English

检查单元格是否为空

[英]Check if cell is empty or not

I'm new to excel , I need to check if cell is empty put zero and if not don't change value 我是excel新手,我需要检查单元格是否为空,并输入zero ;如果不更改,则不更改值

I tried to use =IF(" ",0,**) 我尝试使用=IF(" ",0,**)

But instead of ** I don't know How can i make it don't change the value? 但是我不知道**而不是**如何使它不更改值?

请尝试此操作, =IF(A1>0,A1,0)请注意:这将在不同的列上工作,而不是相同。

try this 尝试这个

=IF(ISBLANK(A1),0,A1)

the problem with your formula is that there is no cell reference. 公式的问题是没有单元格引用。 Here we are checking the cell A1 if it is empty or not. 在这里,我们正在检查单元格A1是否为空。

Update 更新

Since it seems that the cell are not actually blank, try to use this formulae 由于似乎该单元格实际上不是空白,请尝试使用此公式

=IF(TRIM(A1)="",0,A1)

You can actually join the two formula 您实际上可以加入两个公式

=IF(OR(ISBLANK(A1),TRIM(A1)=""),0,A1)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM