#1   Report Post  
Posted to microsoft.public.excel.programming
lee lee is offline
external usenet poster
 
Posts: 184
Default emtpy cell

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 86
Default emtpy cell

VBA gives several options:

IsEmpty function can test for truely empty.
You can also check for an entered zero.
You can also check for the presence of a formula that is currenly yielding
zero.
--
Gary's Student


"Lee" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
applying conditional formatting to emtpy cells in a spreadsheet Gail Excel Discussion (Misc queries) 6 August 6th 08 11:23 AM
Active Hide Emtpy Cells Asian Mike Excel Discussion (Misc queries) 1 January 31st 06 03:56 PM
How to create/run "cell A equals Cell B put Cell C info in Cell D abmb161 Excel Discussion (Misc queries) 5 January 26th 06 06:36 PM
insert amount into first emtpy cell derekc[_5_] Excel Programming 5 May 20th 04 03:49 AM
Hide row when cell is emtpy Hannes Heckner Excel Programming 2 March 5th 04 09:48 AM


All times are GMT +1. The time now is 04:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"