删除所有完全空白的行 [英] Remove all completely blank rows

查看:60
本文介绍了删除所有完全空白的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的工作簿中有两千行.

I have a couple thousand rows in a workbook.

有几百行是空白的.

如何删除整个的每行空白?

推荐答案

有两种方法可以做到这一点:

There are two ways to do that:

1.使用VBA:

此链接中的此处有一个VBA脚本.使用第一个脚本,我的意思是 DeleteBlankRows .

There is a VBA script here in this link. Use the first script, I mean DeleteBlankRows.

您还可以从此处复制相同的代码.

You can also copy the same code from here.

使用方法:

Copy the code.
In Excel press Alt + F11 to enter the VBE.
Press Ctrl + R to show the Project Explorer.

Insert -> Module.
Paste code.
Save and Exit VBE.

运行代码:

Select the column with blank rows.
Press Alt + F8 to open the macro dialog box.
Select DeleteBlankRows
Click Run.

2.没有VBA:

只需在此处查看链接.这很容易,因此无需在这里再次说明.

Just check the link here. It is easy so no need to explain again here.

这篇关于删除所有完全空白的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆