i want to delete the row which have no values from column 3
i changed the code as follows:
Code:
Dim row As Integer, col As Integer
row = 1
col = 3
'suppose you have 100 rows with data in the sheet
For row = 1 To 100
'delete the row if there is no data in the first column
If ecn.Cells(row, col).Value = "" Then
ecn.Rows(row).Delete
End If
Next
but i find that the rows with values in columns 4,5,6 and 8 are all deleted
and more over i dont want to delete the rows, i want to push the entered rows up and empty rows to the last entered row.
the second column contains the line number, i dont want the line number to be changed when the empty rows are push down