

If you are facing any issues while deleting empty rows using this VBA code, then leave us a comment. The above Excel VBA code, scans picks each column in each row & deletes that row only if complete rows has no data. MsgBox "Excel Delete Blank Rows Completed - Thanks for visiting " 'If first cell is Empty, then execute VBA Code to Delete a Row in ExcelĪctiveSheet.Rows(iRow).Delete Shift:=xlUp If VBA.Trim(ActiveSheet.Cells(iRow, iCol)) "" Then 'If Cell 1 is Blank then verify all the columns in that row If VBA.Trim(ActiveSheet.Cells(iRow, iCol)) = "" Then 'Check whether Cell 1 is Blank for that a row 'Code from - How to Delete Blank Rows in Excel using VBA? If your Excel version has more number of columns, then change the data type of variables from Integer to Double and increase the column limits from 256. Note: Below Excel Macro is limited to 256 columns. Modify the code to include the sheet name if you want to perform this operation on a different worksheet.

This Excel VBA code will delete all empty rows in the sheet1 one by one. Lets see other ways on how to identify & remove empty rows in between huge data rows.Īlso Read: Remove Duplicate Values From Excel Sheet 2. Now, notice that this option will delete all empty rows in Excel & the user can happily move on to processing only the valid data. Click Home menu -> Delete -> Delete Sheet Rows.Empty Cells in the selected Range will be highlighted.Select ‘Blanks’ & click OK in the Pop-up menu.Click on option Home -> Find & Select -> choose “Special”.To remove blank rows in Excel, Open the worksheet & follow these menu options. Excel Delete Multiple Blank Rows (Built in Option)
