Thread: VBA
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default VBA

When deleting rows, you should always work from the bottom up.

Dim RowNdx As Long
For RowNdx = 200 To 5 Step -1
If Cells(RowNdx, "B").Value = "" Then
Rows(RowNdx).Delete
End If
Next RowNdx



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


wrote in message
oups.com...
Could some pls help me with the below macro.

Starting from row 5 to say 200

I want to delete the entire row if a cell in Col B is
blank/empty.

Thanks