跳到主要内容

如何在Excel中的其他每列之间快速插入空白列?

当我们操作工作表时,有时我们需要在现有列之间插入一些列。 但是,如果分别插入每一列,则在现有数据列之间插入空白列将是一项繁琐的任务。 有没有快速的方法来解决这个问题?

用VBA代码插入空白列

使用 Kutools for Excel 快速插入空白列


箭头蓝色右气泡 用VBA代码插入空白列

请看下面的屏幕截图,在每列之后,我想插入一个空白列以记录其他信息,我可以使用简短的VBA代码来完成此任务。

1.选择要在数据之间插入空白列的范围。

2。 点击 开发商 > Visual Basic中,一个新的 适用于应用程序的Microsoft Visual Basic 将显示一个窗口,单击 插页 > 模块,然后将以下代码输入到模块中:

子insert_column_every_other()
对于colx = 2到30步骤2
列(colx)。插入Shift:= xlToRight
下一页
END SUB

3。 然后点击  文档乘法计算 3 按钮运行代码。 并且备用空白列已插入到现有列中。

请注意: 此VBA只能在每个第一列之间插入一个空白列。

如果您想以两个间隔插入一个空白列,则以上代码将不起作用。 又如何以指定的间隔快速插入空白列?


箭头蓝色右气泡 使用 Kutools for Excel 快速插入空白列

Excel 的 Kutools: 带有超过300个方便的Excel加载项,可以在30天内免费试用。 立即获取。

的帮助下 Kutools for Excel,您可以轻松解决此问题。 请执行以下操作:

1.突出显示要插入空白列的范围。

2。 点击 库工具 > 插入工具 > 插入空白行/列…,请参见屏幕截图:

文档插入空白列2

3.还有 插入空白行/列 对话框出现。 请点击 空白栏 选项 插入类型。 并输入2 in 间隔,输入1英寸 。 看截图:

4。 然后点击 OK。 您将每隔两个间隔插入一个空白列。 看截图:

插入空白行/列 函数,您还可以在退出数据之间插入特定数量的空白行,并使用特定的间隔。 在这里,我们在每隔两列之间插入两个空白行,请参见屏幕截图:

最佳办公生产力工具

🤖 Kutools 人工智能助手:基于以下内容彻底改变数据分析: 智能执行   |  生成代码  |  创建自定义公式  |  分析数据并生成图表  |  调用 Kutools 函数...
热门特色: 查找、突出显示或识别重复项   |  删除空白行   |  合并列或单元格而不丢失数据   |   不使用公式进行四舍五入 ...
超级查询: 多条件VLookup    多值VLookup  |   跨多个工作表的 VLookup   |   模糊查询 ....
高级下拉列表: 快速创建下拉列表   |  依赖下拉列表   |  多选下拉列表 ....
列管理器: 添加特定数量的列  |  移动列  |  切换隐藏列的可见性状态  |  比较范围和列 ...
特色功能: 网格焦点   |  设计图   |   大方程式酒吧    工作簿和工作表管理器   |  资源库 (自动文本)   |  日期选择器   |  合并工作表   |  加密/解密单元格    按列表发送电子邮件   |  超级筛选   |   特殊过滤器 (过滤粗体/斜体/删除线...)...
前 15 个工具集12 文本 工具 (添加文本, 删除字符,...)   |   50+ 图表 类型 (甘特图,...)   |   40+ 实用 公式 (根据生日计算年龄,...)   |   19 插入 工具 (插入二维码, 从路径插入图片,...)   |   12 转化 工具 (小写金额转大写, 货币兑换,...)   |   7 合并与拆分 工具 (高级组合行, 分裂细胞,...)   |   ... 和更多

使用 Kutools for Excel 增强您的 Excel 技能,体验前所未有的效率。 Kutools for Excel 提供了 300 多种高级功能来提高生产力并节省时间。  单击此处获取您最需要的功能...

产品描述


Office Tab 为 Office 带来选项卡式界面,让您的工作更加轻松

  • 在Word,Excel,PowerPoint中启用选项卡式编辑和阅读,发布者,Access,Visio和Project。
  • 在同一窗口的新选项卡中而不是在新窗口中打开并创建多个文档。
  • 每天将您的工作效率提高50%,并减少数百次鼠标单击!
Comments (7)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
how to copy coloumns from sl no 1 to 10 and paste to merged rows at a time from sl no 1 to 10 copy and paste in rows ab merge cd merge
This comment was minimized by the moderator on the site
Sadly this Kutools does not work on sheets where multiple tables are used above each other. It would be great if you could update the tool to enable this annoying limitation of Excel. I want to add a new column in the middle of ALL my tables within the document but it doesn't seem to be possible.
This comment was minimized by the moderator on the site
Is there a way to make the height of the blank row different from the height of the alternate row?
This comment was minimized by the moderator on the site
After running the macro You can also insert another column by putting 3 after Step
This comment was minimized by the moderator on the site
Can you please tell me the codes for multiple insertions and deletion of columns ?
This comment was minimized by the moderator on the site
This is related to the VB code modification in the excel where macro is there. Instead of doing change in code can i do it directly in the excel that is adding additional column details in excel between two columns
This comment was minimized by the moderator on the site
This is awesome! it works. great! thanks Asif
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations