Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,872
Default a function that deletes all rows with no value in a certain column?

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


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hidden rows reappearinmg when macro deletes rows Code Numpty Excel Programming 2 October 15th 08 12:32 PM
Macro that Deletes All rows except first row curtney Excel Programming 2 July 18th 06 06:22 PM
Macro that deletes certain rows only supamari0 Excel Programming 7 June 9th 06 04:11 PM
Why xl deletes 250+ rows using worksheet_change stumanchu Excel Programming 2 April 24th 06 08:41 PM
Macro that deletes certain rows and not others Roger[_20_] Excel Programming 8 May 3rd 05 12:02 AM


All times are GMT +1. The time now is 04:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"