LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 590
Default Null Field Result in Loop

As part of a larger macro I am running the following loop.

For ILoop = NumRowsF850 To 1 Step -1
If Cells(ILoop, 5) = 0 Then
Rows(ILoop).Delete
End If
Next ILoop

When the loop gets to a cell that is null, it is evaluating the the second
line of code as true, i.e. the cell = 0.

I only want to branch to the "Then" part of the loop if the cell truly has a
0 in it, not if it is null.

How should the second line be written?

TIA.
 
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
I want to use a different cell if my date field is NULL/BLANK Ralph D''Andrea Excel Worksheet Functions 5 October 23rd 07 07:13 PM
How do I get Null as a result of an if? [email protected] Excel Discussion (Misc queries) 6 August 11th 06 07:55 PM
How do I set a result of an "if" function to NULL; not 0 or ""? mbrockhaus Excel Worksheet Functions 5 May 16th 05 06:59 PM
if A1=Null and B1=A1 why is result in B1=0 ?? WGeorg Excel Discussion (Misc queries) 3 March 18th 05 12:32 PM
select column cell in same row as loop result? john_t_h[_7_] Excel Programming 8 January 14th 04 06:21 AM


All times are GMT +1. The time now is 11:56 PM.

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"