A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Hi,
try this code to solve your problem...
data in active sheet
[edit..]
Sub Delete_ListRows_BlankCells_Column2()
Const sCol As Integer = 2 '<< search in column 2
Dim ws As Worksheet
Set ws = ActiveSheet
Dim obj As ListObject
Set obj = ws.ListObjects**("Table16")**
Dim N As Long, x As Long
Dim fg As Boolean
N = obj.ListRows.Count
For x = N To 1 Step -1
If Intersect(obj.ListColumns(sCol).Range, obj.ListRows(x).Range).Value = "" Then
fg = True
obj.ListRows(x).Delete
End If
Next x
If fg = False Then MsgBox "nothing found"
End Sub
or
using List column Name
Sub Delete_ListRows_BlankCells_ColumnName()
Const sName$ = "Tax Lot" '<< Column Name
Dim ws As Worksheet
Set ws = ActiveSheet
Dim obj As ListObject
Set obj = ws.ListObjects**("Table16")**
Dim N As Long, x As Long
Dim fg As Boolean
N = obj.ListRows.Count
For x = N To 1 Step -1
If Intersect(obj.ListColumns(sName).Range, obj.ListRows(x).Range).Value = "" Then
fg = True
obj.ListRows(x).Delete
End If
Next x
If fg = False Then MsgBox "nothing found"
End Sub
Note
you don't need to select data (blank cells) in column 2