Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Worked like a charm. Thanks.
"Norman Jones" wrote: Hi Steve Try, '======================= Public Sub Tester02() Dim Rng As Range, Rng1 As Range Set Rng = Range("A1:K30") '<<====== CHANGE to suit On Error Resume Next Set Rng1 = Intersect(Rng, _ Columns("B:B").SpecialCells(xlBlanks)) On Error GoTo 0 If Not Rng1 Is Nothing Then Rng1.EntireRow.Delete End Sub '<<======================= Change address of Rng to limit the rows to be deleted. --- Regards, Norman "Steve" wrote in message ... This works great, however, is there a way to limit it to a range instead of applying it to the entire wksht. Steve "Norman Jones" wrote: Hi Steve, Try: '======================= Public Sub Tester02() On Error Resume Next Columns("B:B").SpecialCells(xlBlanks). _ EntireRow.Delete On Error GoTo 0 End Sub '<<======================= Alternatively, look at using the AutoFilter featutre. --- Regards, Norman "Steve" wrote in message ... I am looking for a macro to auto-delete rows that are empty between columns A and N. The main column I am concerned with is B. If B? is empty, delete the entire row. Thanks for your time and help, Steve |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hpw do I delete multiple empty rows found between filled rows? | Excel Worksheet Functions | |||
How to Delete empty rows in excel in b/w rows with values | Excel Worksheet Functions | |||
Cut filtered rows, paste into next empty row of new sheet, and delete cut rows | Excel Worksheet Functions | |||
delete empty rows | Excel Programming | |||
Delete rows if they are empty | Excel Programming |