Excel:如何使用VBA检查单元格是否为空? [英] Excel: How to check if a cell is empty with VBA?
本文介绍了Excel:如何使用VBA检查单元格是否为空?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
可能重复:
使用VBA检查下面的单元格是否为空
作为VBA通过检查一个单元格是否与另一个具有特定信息是空的?
示例:
如果A:A =product special而B:B为空然后
C1 =product special
这只是一个想法。
As VBA via check if a cell is empty from another with specific information? example: If A:A = "product special" And B:B is null Then C1 = "product special" It's just an idea.
如何使用范围内的每个。并返回其他单元格中的值?
And how use For Each on the Range. And return the value in other cell?
推荐答案
可以使用 IsEmpty()
函数如下:
...
Set rRng = Sheet1.Range("A10")
If IsEmpty(rRng.Value) Then ...
您还可以使用以下内容: p>
you could also use following:
If ActiveCell.Value = vbNullString Then ...
我不是VBA程序员,所以你不介意?
I'm not a VBA programmer so you won't mind?!
希望它有助于
这篇关于Excel:如何使用VBA检查单元格是否为空?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文