Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test for empty cell
Hi!
I have a sheet, where I have a list of integers - if present - the field might be empty. How do I detect whether it is empty? Using r = MyFile.Sheets(1).Cells(i, 4) and later using r cuases problems, I'd like to set it to -1 in cases where it is empty. I get the file from elswhere, the contest of it is unknown BR Sonnich |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test for empty cell
Try
If MyFile.Sheets(1).Cells(i, 4) = "" Then r = -1 Else r = MyFile.Sheets(1).Cells(i, 4) End If -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Sonnich" wrote in message ups.com... Hi! I have a sheet, where I have a list of integers - if present - the field might be empty. How do I detect whether it is empty? Using r = MyFile.Sheets(1).Cells(i, 4) and later using r cuases problems, I'd like to set it to -1 in cases where it is empty. I get the file from elswhere, the contest of it is unknown BR Sonnich |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Test for empty cell
Restarting it was a good idea... it worked :-)
If MyFile.Sheets(1).Cells(i, 3).Text < "" Then Sonnich wrote: Hi! I have a sheet, where I have a list of integers - if present - the field might be empty. How do I detect whether it is empty? Using r = MyFile.Sheets(1).Cells(i, 4) and later using r cuases problems, I'd like to set it to -1 in cases where it is empty. I get the file from elswhere, the contest of it is unknown BR Sonnich |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF function to test whether the cell value is equal to empty nest | Excel Worksheet Functions | |||
How can I test if a cell is empty? | Excel Discussion (Misc queries) | |||
test expression for empty cell in =SUMIF() | Excel Worksheet Functions | |||
Test for empty row | Excel Programming | |||
Test if Cell is Empty or Doesn't Exist | Excel Programming |