When evaluating the value of a cell in a worksheet in Excel, is the following statement true?
If and only if Len(cell.Value) = 0, then cell.Value = "".
This would imply that it is safe to check that there are zero characters in a cell instead of comparing the cell value to an empty string.
Yes, they do the same thing.
However, I would advise that you use the
IsEmptyfunction to check for empty cells. If you enter a single quote into a cell'both thelencheck and the=""check will both state the the cell is empty. When in actual fact it isn’t.IsEmptywill return false in this scenario.And it’s also a little easier to read.