如果条件为假,请将单元格留空 [英] Leave a cell blank if condition is false

查看:20
本文介绍了如果条件为假,请将单元格留空的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

其他问题已经涉及到这一点,并提供了对于非常大的数据集不可行的解决方案.我在 9 列中有如下公式:

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:

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

然后我自动填充大约 350 万个单元格 + 复制 -> 粘贴值.然后我找到并用空单元格"替换zz".但是,查找和替换大约一百万个zz"字符串是一个非常缓慢的过程.我宁愿一开始就不在那里写任何东西.所以我的问题是,如何编写以下公式:

I then autofill about 3.5 million cells + copy -> paste values. Then I find and replace "zz" with "empty cell". However, finding and replacing a million or so "zz" strings is a very slow process. I'd rather not write anything there in the first place. So my question is, how to I write the following formula:

=IF(A1=A2, B2, 'leave cell alone and write nothing there at all')

如果为 FALSE(或 TRUE),Excel 似乎无法不接触单元格.

Excel seems to be incapable of not touching a cell in case of FALSE (or TRUE for that matter).

推荐答案

单元格包含公式的事实已经意味着它不是真正的空.常见的做法是使用空字符串,比如

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,"")

=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.

这篇关于如果条件为假,请将单元格留空的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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