How about
sub foo()
dim r As Range, rows As Long, i As Long
Set r = ActiveSheet.Range("A1:Z50")
rows = r.rows.Count
For i = rows To 1 Step (-1)
If WorksheetFunction.CountA(r.rows(i)) = 0 Then r.rows(i).Delete
Next
End Sub
More Related Contents:
- Duplicate number and it value in column EXCEL [closed]
- Loop through files in a folder using VBA?
- How to error handle 1004 Error with WorksheetFunction.VLookup?
- Force a screen update in Excel VBA
- Find all matches in workbook using Excel VBA
- Create a new sheet for each unique agent and move all data to each sheet
- Set Auto Filtering multiple wildcards
- How to make Excel VBA variables available to multiple macros?
- Detect merged cells in VBA Excel with MergeArea
- Use of symbol # (hash) in VBA Macro
- Excel VBA: Can’t get a match, error “Unable to get the Match property of the WorksheetFunction class”
- Excel VBA looping through multiple worksheets
- When one should use Set [e.g for SpecialCells return value]?
- Excel: macro to export worksheet as CSV file without leaving my current Excel sheet
- Is there a faster CountIF
- Excel VBA How to detect if something was pasted in a Worksheet
- Getting error Procedure too large in VBA Macros (Excel)
- How to add data validation to a cell using VBA
- How to do late binding in VBA?
- Removing the password from a VBA project
- How to break long string to multiple lines
- How to copy a chart from Excel to PowerPoint?
- vba paste not working
- mac excel vba loop : from list & then export as pdf
- Can Advanced Filter criteria be in the VBA rather than a range?
- In Excel VBA, what is the way to check if the web page is fully loaded?
- Excel Useform: How to hide application but have icon in the taskbar
- Reading Web Pages using Excel VBA
- Excel VBA: auto click and open file from website
- VBA inheritance, analog of super