Checking for cell content
That worked very well, so I thank you for that, but wonder if you might be
able to clear up another bit of confusion.
After I made the post, I wondered if activecell.value = true might be a good
test. Whipped it up in a test spreadsheet and it worked. But when I put it
into the real spreadsheet this morning, it didn't recognize 0's as cell
content.
Is there a simple explanation for why that would be? If you have the time to
answer, again, much appreciated.
"Dave Peterson" wrote:
For one cell:
if isempty(yourrangehere.value) then
If it's multiple cells:
if application.counta(yourrangehere) = 0 then
danhattan wrote:
I need to know if a cell is empty so my code can paste into it if so. If I
were just entering a formula into a worksheet I'd just use COUNT or COUNTA.
But I'm not sure what the equivalent check in VBA is. Unfortunately, my data
will at times include zeros so checking for 0 isn't working either.
If anyone can help me, it's very much appreciated.
Dan
--
Dave Peterson
|