Excel blank row deletion

[Closed]
Report
-
 Michael -
Hello,

Can anyone provide the macro code for deleting all the blank rows in all excels in a folder??

thanks...munni

1 reply

Go to Tool > Macro > Visual Basic Editor

Type in the following into the page you want to delete the blank line from

-------------------------------------------------------------------------------------------------------------
Sub DeleteHiddenRows()
Dim iRow As Long

With Application
.Calculation = xlCalculationManual
.EnableEvents = False
.ScreenUpdating = False

With ActiveSheet.UsedRange
For iRow = .Row + .Rows.Count - 1 To .Row Step -1
If Rows(iRow).Hidden Then Rows(iRow).Delete
Next iRow
End With

.Calculation = xlCalculationAutomatic
.EnableEvents = True
.ScreenUpdating = True
End With
End Sub
-------------------------------------------------------------------------------------------------------------

Thats it :o)
5
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2821 users have said thank you to us this month