Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
applying conditional formatting to emtpy cells in a spreadsheet | Excel Discussion (Misc queries) | |||
Active Hide Emtpy Cells | Excel Discussion (Misc queries) | |||
How to create/run "cell A equals Cell B put Cell C info in Cell D | Excel Discussion (Misc queries) | |||
insert amount into first emtpy cell | Excel Programming | |||
Hide row when cell is emtpy | Excel Programming |