Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 360
Default find an empty cell or null value

How do you find out if a cell is null? The datatype for that field is
integer. I want to test for a empty cell. I'm not sure if either one of
these is correct.
Thanks

If .Cells(iRow, 19).Value = ""

if .Cells(iRow, 19).Value isNull
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default find an empty cell or null value

This is probably your best bet

If Trim(.Cells(iRow, 19).Value) = ""

Just in case your cell has blank spaces in it...
--
HTH...

Jim Thomlinson


"Janis" wrote:

How do you find out if a cell is null? The datatype for that field is
integer. I want to test for a empty cell. I'm not sure if either one of
these is correct.
Thanks

If .Cells(iRow, 19).Value = ""

if .Cells(iRow, 19).Value isNull

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default find an empty cell or null value

if .cells(irow,19).value = "" then
will test to see if the cell is empty
or if the cell contains a formula that evaluates to ""
or if the cell contains a 0 length string (like just the apostrophe ('))

=if isempty(.cells(irow,19).value) then
will check to see if the cell is really empty--nothing at all in it.



Janis wrote:

How do you find out if a cell is null? The datatype for that field is
integer. I want to test for a empty cell. I'm not sure if either one of
these is correct.
Thanks

If .Cells(iRow, 19).Value = ""

if .Cells(iRow, 19).Value isNull


--

Dave Peterson
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
setting a cell to 'empty' or blank or null ? KRK New Users to Excel 7 May 7th 08 12:49 AM
How do you stop excel from charting empty cells/null values as zer Abe-air Charts and Charting in Excel 3 March 20th 06 11:57 PM
make cell contents equal to null value - not blank, but empty mpierre Excel Worksheet Functions 1 December 29th 04 06:57 AM
Please help find the next empty cell pcarsquared Excel Programming 5 May 17th 04 10:23 PM
Testing for null or empty gwgeller[_3_] Excel Programming 4 January 29th 04 08:34 PM


All times are GMT +1. The time now is 09:21 PM.

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

About Us

"It's about Microsoft Excel"