amitcohen
Board Regular
- Joined
- Jan 14, 2010
- Messages
- 118
Hi Guys
I'm using the following code to delete empty rows
How to change the code so it will delete only first 10 cells that are empty.
In other words, instead of deleting all row no 4 (for instance)
It will only delete "A4:J4".
and on.. and on..
Many thanks for your help.
Amit
I'm using the following code to delete empty rows
But its only works on entire row.Sub DeleteEmptyRows()
'only if entire row is blank
LastRow = ActiveSheet.UsedRange.Row - 1 + _
ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False
For R = LastRow To 1 Step -1
If Application.CountA(Rows(R)) = 0 Then
Rows(R).Delete
End If
Next R
End Sub
How to change the code so it will delete only first 10 cells that are empty.
In other words, instead of deleting all row no 4 (for instance)
It will only delete "A4:J4".
and on.. and on..
Many thanks for your help.
Amit