VBA Macro to delete empty rows

trid0032

New Member
Joined
Feb 18, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
1645212328495.png


I'm kind of lost and I'm trying to get a code which will delete a row based on whether an entire row blank in the range of A to I

example if row 9 was blank it would delete row 9 and row 10 would become 9 and so on down.
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
@trid0032
If you have a lot of data, this will be faster...no loop required
VBA Code:
Sub MM1()
Application.ScreenUpdating = False
  With Range("F2", Cells(Rows.Count, "F").End(xlUp))
    .Replace "Load Complete", "#N/A", xlWhole, , False, , False, False
    Columns("F").SpecialCells(xlConstants, xlErrors).EntireRow.Delete
  End With
Application.ScreenUpdating = True
End Sub
 
Upvote 0

Forum statistics

Threads
1,214,990
Messages
6,122,626
Members
449,093
Latest member
catterz66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top