Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

a function that deletes all rows with no value in a certain column?

3 views
Skip to first unread message

dunndealpr

unread,
Jun 6, 2013, 3:44:41 PM6/6/13
to

Hey all, I use Excel 2007. Can it be set up to delete all rows in an
excel file when there is no value in a certain column? For instance,
every row with no value in column H would automatically be deleted?




--
dunndealpr

Claus Busch

unread,
Jun 6, 2013, 3:55:30 PM6/6/13
to
Hi,
filter column H for empty cells and delete the visible rows.


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2

Claus Busch

unread,
Jun 6, 2013, 4:07:18 PM6/6/13
to
Hi,

Am Thu, 6 Jun 2013 21:55:30 +0200 schrieb Claus Busch:

> filter column H for empty cells and delete the visible rows.

if you want to do it automatically, then try VBA:

Sub DeleteRows()
Dim LRow As Long

LRow = Cells(Rows.Count, "H").End(xlUp).Row
Range("A1:H" & LRow).AutoFilter Field:=8, Criteria1:="="
Range("A2:H" & LRow).EntireRow.Delete
ActiveSheet.AutoFilterMode = False
End Sub
0 new messages