Ask Your Question

Macro to delete blank rows, having no content,rows in a given range. [closed]

asked 2018-03-07 14:35:26 +0200

updated 2018-03-18 16:59:45 +0200

As a1 to a100. having many blank rows to delete.

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Mark McLean
close date 2018-11-27 19:47:36.436778

1 Answer

Sort by » oldest newest most voted

answered 2018-03-07 16:17:03 +0200

Lupp gravatar image

updated 2018-03-07 17:58:03 +0200

If this is about rows not having content in column A it's simple:
-1- Select the range of column A you want to work on, A1:A100 e.g.
-2- Apply Data > AutoFilter
-3- Select the range A2:A100 now (leaving out the column header now connected to the filter).
-4- Delselect All and select Empty from the filter's dropdown.
-5- Rightclick one of the row headers and apply Delet Rows.
-5- Select All for the filter.

If your question is about rows without any content in any column, please state this explicitly by editing your question.

(Edit 1:)
Since the orioginal question was explicitly about a macro, and the actuall condition for deletion of rows was somehow unclear, I also sketched an example Calc document going into more detail and allowing for more flexibility.
There is also a solution by "macro" now only deleting rows without a content in any cell. The range to work on is determined from the CurrentSelection here.

edit flag offensive delete link more


Thanks @Lupp. That was more than enough to clean it all up. Simple, yes, I forgot about those options in Data, for a quick fixes which I needed only this once. You have helped me out much this last month or so, thanks for your time and knowledge!

Mark McLean gravatar imageMark McLean ( 2018-03-07 16:37:27 +0200 )edit

Question Tools

1 follower


Asked: 2018-03-07 14:35:26 +0200

Seen: 755 times

Last updated: Mar 18 '18