delete empty rows

Parra

Well-known Member
Joined
Feb 21, 2002
Messages
752
I have a macro that deletes empty rows and it works fine, however. I don't think it will delete a cell that has a boarder. Is there any way to delete a empty row even though it has a boarder. I am not a big wiz on macros.

Please help, Thanks
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Post your code. I have no clue why your macro would ignore a cell with a border.
Tom
 
Upvote 0
On 2002-04-05 16:21, Parra wrote:
I have a macro that deletes empty rows and it works fine, however. I don't think it will delete a cell that has a boarder. Is there any way to delete a empty row even though it has a boarder. I am not a big wiz on macros.

Please help, Thanks


I cannot help you with your code problem. However, I am interested in how you delete those blank rows. We are presently hiding rows in order to make a form work. Deleting them would make it ideal. Any help in this matter greatly appreciated.
 
Upvote 0
Below is the code. Someone from this website gave it to me and it works great. I am just having problems integrating it with another macro.

Sub DeleteEmptyRows()
LastRow = ActiveSheet.UsedRange.Row - 1 + _
ActiveSheet.UsedRange.Rows.Count
Application.ScreenUpdating = False
For r = LastRow To 1 Step -1
If Application.CountA(Rows(r)) = 0 Then Rows(r).Delete
Next r
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,549
Messages
6,114,264
Members
448,558
Latest member
aivin

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