Excel: How to check if a cell is empty with VBA?

excel, vba

Solution

You could use `IsEmpty()` function like this:

...
Set rRng = Sheet1.Range("A10")
If IsEmpty(rRng.Value) Then ...

you could also use following:

If ActiveCell.Value = vbNullString Then ...

Problem

Via VBA how can I check if a cell is empty from another with specific information? For example: If A:A = "product special" And B:B is null Then C1 = "product special" Additionally, how can I use a `For Each` loop on the`Range` and how can I return the value in the other cell?

Original source

Related problems