Thread: emtpy cell
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default emtpy cell

A cell containing 0 is not empty - but regardless, perhaps this will help:

Dim cell as Range
for each cell in Range("B57:B76")
if isempty(cell) then
msgbox cell.Address & " contains nothing"
exit for
elseif isnumeric(cell) then
if cell.Value = 0 then
msgbox "contains zero " & cell.address
exit for
end if
end if
Next

--
Regards,
Tom Ogilvy


"Lee" wrote in message
...
I am new to programming and wonder if there is a way to check for a emty

cell
( a cell that has the value of 0). I have a column B57:B76 I would like to
check if B57 has anything 0 if it does move to b58 and check if that is
0
and so on. When the program finds the first cell that is a emty cell, it

then
used data on a other worksheet and the number in the last cell it checked

for
the calculations to be placed in B77.

I think I could do it with if statements. I think it might be to long.

thanks for any help