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 |
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 |
All times are GMT +1. The time now is 03:56 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com