BrianExcel
Well-known Member
- Joined
- Apr 21, 2010
- Messages
- 975
I the following block of code which is supposed to delete every cell in the range if a value in the row is blank or 0.
It seems to be working properly - but for some reason there is one row in the data set that doesn't get deleted as expected. The first cell in the row has a value but the following 3 columns do not so it should be deleted.
Every other row in the dataset works fine. I can't figure out a possible reason why it would miss or skip that row??
I've checked and the cells are either empty or contain 0...
Thoughts?
VBA Code:
With FinalRange
For Each r In FinalRange
If r = "0" Or r = "" Then
r.EntireRow.Delete
End If
Next
End With
It seems to be working properly - but for some reason there is one row in the data set that doesn't get deleted as expected. The first cell in the row has a value but the following 3 columns do not so it should be deleted.
Every other row in the dataset works fine. I can't figure out a possible reason why it would miss or skip that row??
I've checked and the cells are either empty or contain 0...
Thoughts?