Nelson78
Well-known Member
- Joined
- Sep 11, 2017
- Messages
- 526
- Office Version
- 2007
Hello everybody.
In the range A1:J10 I have a situation like this
https://imgur.com/ukRGiNG
I need to eliminate the empty rows (3, 4, 6 e 9) end shift the not empty rows on the left, so that no empty cells
https://imgur.com/a/tXxE4rc
I have tried something like this to eliminate the rows with a check on column F, but I am not convinced about.
In the range A1:J10 I have a situation like this
https://imgur.com/ukRGiNG
I need to eliminate the empty rows (3, 4, 6 e 9) end shift the not empty rows on the left, so that no empty cells
https://imgur.com/a/tXxE4rc
I have tried something like this to eliminate the rows with a check on column F, but I am not convinced about.
Code:
Dim ic As Variant
Dim ir As Long
Dim x As Long
ic = 6
ir = 1
For x = 1 To 10
If Cells(ir, ic) = Empty Then
Cells(ir, ic).EntireRow.Delete
End If
ir = ir + 1
x = x + 1
Next
Last edited: