In this video, I will show you three ways to delete blank rows in Excel.
00:00 Intro
00:10 Go To Special to Delete Blank Rows
02:51 Delete Blank Rows Using the SORT Option
05:25 Delete Blank Rows Using Find and Replace
08:20 VBA to Delete Blank Rows
--------------------------------------------------------------------------------
Here is the VBA code I used in the video:
'Code Developed by Sumit Bansal from TrumpExcel.com
Sub DeleteBlankRows()
Dim EntireRow As Range
On Error Resume Next
MsgBox Selection.Row.Count
Application.ScreenUpdating = False
For i = Selection.Rows.Count To 1 Step -1
Set EntireRow = Selection.Cells(i, 1).EntireRow
If Application.WorksheetFunction.CountA(EntireRow) = 0 Then
EntireRow.Delete
End If
Next
Application.ScreenUpdating = True
End Sub
----------------------------------------------------------------------------------
While most people I see use the Go To Special option, it has a big drawback. It would also delete rows where only some of the cells are blank. None of the methods I have covered in this video have this issue.
☕ If you find my Excel videos useful and would like to support me, you can buy me a coffee - www.buymeacoff...
✅ Free Excel Course (Basic to Advanced) - trumpexcel.com...
✅ Free Dashboard Course - bit.ly/free-ex...
✅ Free VBA course - bit.ly/excel-v...
✅ Free Power Query Course - bit.ly/power-q...
✅ Best Excel Books: trumpexcel.com...
Subscribe to get awesome Excel Tips every week: www.youtube.co...
#Excel #ExcelTips #ExcelTutorial
18 авг 2024