Handling Null Field in Macro Loop

K

Ken

The following loop is part of a larger macro.

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

If I find a null cell in the loop on line two, it is evaluated as 0 and the
code branches to the third line.

I do not want to execute the third line of code if the cell is null.

How do I need to re-code line two to avoid this problem?

TIA.
 
J

Jake Marx

Ken said:
How do I need to re-code line two to avoid this problem?

Please see response to thread started 10 mins earlier.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top