Hey guys,
Not really a problem, just a question that I’d like a few views on. Whenever I want to check if a cell is empty with VBA I generally use something like If Range(“A1”)=””. However I’ve noticed a lot of code on this site using IsEmpty(Range(“A1”)). While I quite like the idea of the IsEmpty function approach, when I look at the Help files the IsEmpty function doesn’t really seem to be designed to be used in this way, rather it is for checking whether a variable has been initialized. However, it does seem to work perfectly well. I guess my question is, is this a good technique, or are there some unknown pitfalls that I don’t know about?
Any thoughts would be welcome.
Not really a problem, just a question that I’d like a few views on. Whenever I want to check if a cell is empty with VBA I generally use something like If Range(“A1”)=””. However I’ve noticed a lot of code on this site using IsEmpty(Range(“A1”)). While I quite like the idea of the IsEmpty function approach, when I look at the Help files the IsEmpty function doesn’t really seem to be designed to be used in this way, rather it is for checking whether a variable has been initialized. However, it does seem to work perfectly well. I guess my question is, is this a good technique, or are there some unknown pitfalls that I don’t know about?
Any thoughts would be welcome.