matrixknow
IS-IT--Management
- May 3, 2007
- 78
I have a sub that delete an empty row on basic of the value of the first cell. However this is not enough. He should dedect the values of the row or at least of a range (from the first cell to the cell of the last column. If I write this "IsEmpty(sh.Range(Cells(i4Row, 1), Cells(i4Row, 3))) it" is not working
Code:
For i4Row = lLR To 2 Step -1
' If sh.Cells(i4Row, "A").value = vbNullString Then
' sh.rows(i4Row).EntireRow.Delete 'works but on one cell
' End If
' Next i4Row
For i4Row = lLR To 2 Step -1
If IsEmpty(sh.Range(Cells(i4Row, 1), Cells(i4Row, 3))) Then
sh.rows(i4Row).EntireRow.Delete
End If