Leave a cell blank if condition is false

后端 未结 3 1042
执笔经年
执笔经年 2021-01-14 15:28

Other questions have touched on this and offered solutions that are not viable for a very large data set. I have a formula like the following across 9 columns:



        
相关标签:
3条回答
  • 2021-01-14 15:35

    Let NULL be the name of a cell that has "" in it, and BLANK be the name of a cell that is truly blank.

    NULL is not truly blank; ISBLANK(NULL) will return FALSE. But note that '=' takes blank and null cells to be identical. So for any cell C1:

    (C1="")
    (C1=BLANK)
    (C1=NULL)
    

    will all return TRUE if C1 is truly blank OR if it contains "". (I find this simpler than using COUNTBLANK(C1)>0, which has been suggested elsewhere.)

    0 讨论(0)
  • 2021-01-14 15:39

    try this

    =IF(A1=A2,B2,TRIM(""))
    
    0 讨论(0)
  • 2021-01-14 15:56

    The fact that the cell contains a formula already means that it is not truly empty. Common practice is to use an empty string, like

    =IF(A1=A2, B2,"")

    There are not many situations where this will be problematic, and if a problem arises, in most cases there are different techniques that can be applied.

    0 讨论(0)
提交回复
热议问题