Delete rows with no values in column E

saraereinosa

New Member
Joined
Jun 20, 2012
Messages
6
I have data like so:

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][TABLE="width: 136"]
<colgroup><col width="136"></colgroup><tbody>[TR]
[TD="class: xl65, width: 136, align: right"]00:01:18.941
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 133"]
<colgroup><col width="133"></colgroup><tbody>[TR]
[TD="class: xl65, width: 133"]Session begin[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][TABLE="width: 79"]
<colgroup><col width="79"></colgroup><tbody>[TR]
[TD="class: xl65, width: 79"]State start[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 136"]
<colgroup><col width="136"></colgroup><tbody>[TR]
[TD="class: xl65, width: 136, align: right"]00:01:18.941[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 133"]
<colgroup><col width="133"></colgroup><tbody>[TR]
[TD="class: xl65, width: 133"]63 Eyes Up[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 153"]
<colgroup><col width="153"></colgroup><tbody>[TR]
[TD="class: xl65, width: 153"]B= Slight[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 79"]
<colgroup><col width="79"></colgroup><tbody>[TR]
[TD="class: xl65, width: 79"]State start[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 136"]
<colgroup><col width="136"></colgroup><tbody>[TR]
[TD="class: xl65, width: 136, align: right"]00:01:20.810[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 133"]
<colgroup><col width="133"></colgroup><tbody>[TR]
[TD="class: xl65, width: 133"]61 Eyes Left[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 153"]
<colgroup><col width="153"></colgroup><tbody>[TR]
[TD="class: xl65, width: 153"]E= Maximum[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 79"]
<colgroup><col width="79"></colgroup><tbody>[TR]
[TD="class: xl65, width: 79"]State start[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 68"]
<colgroup><col width="68"></colgroup><tbody>[TR]
[TD="class: xl65, width: 68"]63B[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 136"]
<colgroup><col width="136"></colgroup><tbody>[TR]
[TD="class: xl65, width: 136, align: right"]00:01:21.177[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 133"]
<colgroup><col width="133"></colgroup><tbody>[TR]
[TD="class: xl65, width: 133"]61 Eyes Left[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 153"]
<colgroup><col width="153"></colgroup><tbody>[TR]
[TD="class: xl65, width: 153"]E= Maximum[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 79"]
<colgroup><col width="79"></colgroup><tbody>[TR]
[TD="class: xl65, width: 79"]State start[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 136"]
<colgroup><col width="136"></colgroup><tbody>[TR]
[TD="class: xl65, width: 136, align: right"]00:01:21.177[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 133"]
<colgroup><col width="133"></colgroup><tbody>[TR]
[TD="class: xl65, width: 133"]63 Eyes Up[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 153"]
<colgroup><col width="153"></colgroup><tbody>[TR]
[TD="class: xl65, width: 153"]E= Maximum[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 79"]
<colgroup><col width="79"></colgroup><tbody>[TR]
[TD="class: xl65, width: 79"]State start[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 136"]
<colgroup><col width="136"></colgroup><tbody>[TR]
[TD="class: xl65, width: 136, align: right"]00:01:25.114
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 133"]
<colgroup><col width="133"></colgroup><tbody>[TR]
[TD="class: xl65, width: 133"]43 Eye Closure[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 153"]
<colgroup><col width="153"></colgroup><tbody>[TR]
[TD="class: xl65, width: 153"]E= Maximum[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 79"]
<colgroup><col width="79"></colgroup><tbody>[TR]
[TD="class: xl65, width: 79"]State start[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 68"]
<colgroup><col width="68"></colgroup><tbody>[TR]
[TD="class: xl65, width: 68"]63B
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 136"]
<colgroup><col width="136"></colgroup><tbody>[TR]
[TD="class: xl65, width: 136, align: right"]00:01:25.915[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 133"]
<colgroup><col width="133"></colgroup><tbody>[TR]
[TD="class: xl65, width: 133"]04 Brow Lowerer[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 153"]
<colgroup><col width="153"></colgroup><tbody>[TR]
[TD="class: xl65, width: 153"]E= Maximum[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 79"]
<colgroup><col width="79"></colgroup><tbody>[TR]
[TD="class: xl65, width: 79"]State start
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 136"]
<colgroup><col width="136"></colgroup><tbody>[TR]
[TD="class: xl65, width: 136, align: right"]00:01:25.915[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 133"]
<colgroup><col width="133"></colgroup><tbody>[TR]
[TD="class: xl65, width: 133"]09 Nose Wrinkle[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 153"]
<colgroup><col width="153"></colgroup><tbody>[TR]
[TD="class: xl65, width: 153"]E= Maximum
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 79"]
<colgroup><col width="79"></colgroup><tbody>[TR]
[TD="class: xl65, width: 79"]State start[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 136"]
<colgroup><col width="136"></colgroup><tbody>[TR]
[TD="class: xl65, width: 136, align: right"]00:01:26.215[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 133"]
<colgroup><col width="133"></colgroup><tbody>[TR]
[TD="class: xl65, width: 133"]04 Brow Lowerer[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 153"]
<colgroup><col width="153"></colgroup><tbody>[TR]
[TD="class: xl65, width: 153"]E= Maximum[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 79"]
<colgroup><col width="79"></colgroup><tbody>[TR]
[TD="class: xl65, width: 79"]State start[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 68"]
<colgroup><col width="68"></colgroup><tbody>[TR]
[TD="class: xl65, width: 68"]63B
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 136"]
<colgroup><col width="136"></colgroup><tbody>[TR]
[TD="class: xl65, width: 136, align: right"]00:01:26.215[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 133"]
<colgroup><col width="133"></colgroup><tbody>[TR]
[TD="class: xl65, width: 133"]09 Nose Wrinkle[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 153"]
<colgroup><col width="153"></colgroup><tbody>[TR]
[TD="class: xl65, width: 153"]E= Maximum[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 79"]
<colgroup><col width="79"></colgroup><tbody>[TR]
[TD="class: xl65, width: 79"]State start[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 136"]
<colgroup><col width="136"></colgroup><tbody>[TR]
[TD="class: xl65, width: 136, align: right"]00:01:26.349[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 133"]
<colgroup><col width="133"></colgroup><tbody>[TR]
[TD="class: xl65, width: 133"]43 Eye Closure[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 153"]
<colgroup><col width="153"></colgroup><tbody>[TR]
[TD="class: xl65, width: 153"]E= Maximum[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 79"]
<colgroup><col width="79"></colgroup><tbody>[TR]
[TD="class: xl65, width: 79"]State start[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 136"]
<colgroup><col width="136"></colgroup><tbody>[TR]
[TD="class: xl65, width: 136, align: right"]00:01:26.549[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 133"]
<colgroup><col width="133"></colgroup><tbody>[TR]
[TD="class: xl65, width: 133"]62 Eyes Right[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 153"]
<colgroup><col width="153"></colgroup><tbody>[TR]
[TD="class: xl65, width: 153"]E= Maximum[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 79"]
<colgroup><col width="79"></colgroup><tbody>[TR]
[TD="class: xl65, width: 79"]State start[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 68"]
<colgroup><col width="68"></colgroup><tbody>[TR]
[TD="class: xl65, width: 68"]63B[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

and I want to delete all rows that don't have data in the last column (ALWAYS COLUMN E IN EXCEL).

Does anyone know how to do this?

Thank you.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Code:
Sub delEblank()
Dim sh As Worksheet, lr As Long, rng As Range
Set sh = Sheets(1) 'Edit sheet name
lr = sh.Cells(Rows.Count, 1).End(xlUp).Row
Set rng = sh.Range("E2:E" & lr)
For i = lr To 2 Step -1
If sh.Cells(i, 4) = "" Then
sh.Cells(i, 4).EntireRow.Delete
End If
Next
End Sub
Code:
 
Upvote 0
Shorter
Code:
Sub delEblank()
Dim i As Long
    For i = Sheets(1).Cells(Rows.Count, 5).End(xlUp).Row To 2 Step -1
        If Cells(i, 5) = "" Then Rows(i).Delete
    Next
End Sub
 
Upvote 0
yes mirabeau, I should have used that as well.....:oops:...too early in the morning for me !!!
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top