Gringoire
Board Regular
- Joined
- Nov 18, 2016
- Messages
- 71
- Office Version
- 365
- Platform
- Windows
Dear friends,
As inexperienced user I'm facing with another issue:
I need to check if a Range is empty so I used this code:
This work flawlessly until I check a Row containing a #RIF! or #DIV/0! value. In this case CountA returns a value that is not ZERO
I need to deal with these error values exactly as if the Row is totally empty but I cannot easily make a pre-check about errors because the error value itself is created at runtime due to previous Rows(j).Delete iteration.
So my question is:
Is it possible to check if a Range includes only empty and/or Error cells?
Thanks for your help.
As inexperienced user I'm facing with another issue:
I need to check if a Range is empty so I used this code:
VBA Code:
For j = Row_1dati To Row_lastdati
If WorksheetFunction.CountA(Range(Cells(j, Col_1dati), Cells(j, Ult_col))) = 0 Then
Rows(j).Delete
...some other code here...
End If
Next j
This work flawlessly until I check a Row containing a #RIF! or #DIV/0! value. In this case CountA returns a value that is not ZERO
I need to deal with these error values exactly as if the Row is totally empty but I cannot easily make a pre-check about errors because the error value itself is created at runtime due to previous Rows(j).Delete iteration.
So my question is:
Is it possible to check if a Range includes only empty and/or Error cells?
Thanks for your help.