PC Review


Reply
Thread Tools Rate Thread

deleting an entire row if the cell in col A is empty

 
 
=?Utf-8?B?WmIgS29ybmVja2k=?=
Guest
Posts: n/a
 
      8th Mar 2007
would some one please help me w/ the coding for a loop for deleting an entire
row if the cell in column A is empty. I've tried several FOR EACH loops w/
little success.
Thanks
Zb
 
Reply With Quote
 
 
 
 
Gord Dibben
Guest
Posts: n/a
 
      8th Mar 2007
Sub delete_rows()
Dim RowNdx As Long
Dim LastRow As Long
LastRow = ActiveSheet.UsedRange.Rows.Count
For RowNdx = LastRow To 1 Step -1
If Cells(RowNdx, "A").Value = "" Then
Rows(RowNdx).Delete
End If
Next RowNdx
End Sub


Gord Dibben MS Excel MVP

On Wed, 7 Mar 2007 16:50:08 -0800, Zb Kornecki <zDOTkorneckiATcomcastDOTnet>
wrote:

>would some one please help me w/ the coding for a loop for deleting an entire
>row if the cell in column A is empty. I've tried several FOR EACH loops w/
>little success.
>Thanks
>Zb


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to SUM entire column, but only when adjacent cell is not empty SteveDJ Microsoft Excel Worksheet Functions 3 7th May 2010 09:16 PM
Making a cell blank or empty without deleting it Brunner Microsoft Excel New Users 1 18th Dec 2006 10:44 PM
deleting entire rows with the same cell value in the first column =?Utf-8?B?UGVkcm8gRi4=?= Microsoft Excel Misc 3 11th Jan 2006 07:10 PM
Macro to delete entire row based on empty cell =?Utf-8?B?QUw=?= Microsoft Excel Programming 1 19th Mar 2004 01:58 AM
Deleting rows based on cell is empty Todd Microsoft Excel Programming 14 11th Mar 2004 02:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:14 PM.