Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default deleting an entire row if the cell in col A is empty

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default deleting an entire row if the cell in col A is empty

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
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
How to SUM entire column, but only when adjacent cell is not empty SteveDJ Excel Worksheet Functions 3 May 7th 10 09:16 PM
Deleting entire row if cell contains "value" - how to review everytime? V[_2_] Excel Worksheet Functions 1 August 16th 08 03:55 AM
Making a cell blank or empty without deleting it Brunner New Users to Excel 1 December 18th 06 10:44 PM
deleting entire rows with the same cell value in the first column Pedro F. Excel Discussion (Misc queries) 3 January 11th 06 07:10 PM
empty a entire row bill gras Excel Programming 3 October 22nd 05 06:16 AM


All times are GMT +1. The time now is 09:03 PM.

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

About Us

"It's about Microsoft Excel"