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?!
希望它有助于