Search : in
By :

Excel blank row deletion

Last answer on Feb 17, 2009 11:03:12 am GMT munni, on Nov 25, 2008 6:02:48 am GMT 
 Report this message to moderators

Hello,

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

thanks...munni

Configuration: Windows XP
Internet Explorer 6.0

Best answers for « excel blank row deletion » in :
Excel – Macro to detect and hide blank rows ShowExcel – Macro to detect and hide blank rows Issue Solution Note Issue I want a macro to unhide about 20 blank rows copy values into the top row then hide the remaining rows (some cells have fill though) then the next time it will...
Delete duplicates in an Excel column ShowDelete duplicates in an Excel column To remove duplicates in an Excel column: Click on the Data menu Filter Advanced Filter In this menu, select the column where the duplicates Check the box "Extract without duplication"...
[VBA] Deleting a word in a range of cell Show[VBA] Deleting a word in a range of cell In the case you want to delete a word in a sentence, just create a small macro that removes the word. But it will become difficult when you have word like, for example, "Theword" or "THEWORD" or...
Spreadsheets - The Excel Interface ShowExcel Introduction Microsoft Excel is the spreadsheet in the Microsoft Office office suite. To start it, simply click on the appropriate icon in the Start menu (in Windows) or click on an Excel file (that has an .xls file extension). A Excel...

1

 Michael, on Feb 17, 2009 11:03:12 am GMT
  • +3

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)

Reply to Michael