how do i delete blank rows?

Davers

Well-known Member
Joined
Sep 17, 2002
Messages
1,165
I'm sure this answer is so simple I'll cry when I hear it...somehow, one of my workbooks got the impression that there is over 65,000 rows in one of the worksheets. Because of this, the file is over 2mb. All my other workbooks have roughly 100 rows...if i select the extra rows, right click and choose delete, more rows take their place. How can I permanently get rid of all the extra rows, and only have the ones that include date show up?

Thanks,

Dave M.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Asala42

Well-known Member
Joined
Feb 26, 2002
Messages
2,318
Instead of Deleting, try EditClear All on the extra rows. Then Save and check the filesize.
 

Jack in the UK

Well-known Member
Joined
Feb 16, 2002
Messages
3,215
Hi this is not Jacks work, gawd knows where it came from SORRY to the programmer, pleas let me know and ill post the correct acredatations

Select cell A1 and run, injput number of rows and it will delete what blank in Column A

Or belect B1 and B column blanks will be deleted

HTH

Jack [the codes below plese feel free and link to a standard command buton - oh the code must go in standard module]



Sub Delete_Row()
' Jack deletes rows in ACTIVE Sheet ONLY
Dim Counter
Dim i As Integer
' Input box to determine the total number of rows in the worksheet.
Counter = InputBox("Enter the total number of rows to process")
ActiveCell.Select
' Loops through the desired number of rows.
For i = 1 To Counter
' Checks to see if the active cell is blank.
If ActiveCell = "" Then
Selection.EntireRow.Delete

' Decrements count each time a row is deleted. This ensures
' that the macro will not run past the last row.
Counter = Counter - 1
Else
' Selects the next cell.
ActiveCell.Offset(1, 0).Select
End If

Next i
' If ActiveCell = "" Then
' If Len(Trim(ActiveCell)) = 0 Then
End Sub
 

Davers

Well-known Member
Joined
Sep 17, 2002
Messages
1,165
Thanks to everyone for your replies! I'll try all of those out actually! Thanks for responding so quickly too!!

Have a good day,
 

Forum statistics

Threads
1,143,709
Messages
5,720,391
Members
422,283
Latest member
Parvathy

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
Top