在Excel中插入行X行 [英] Insert row every X rows in excel

查看:107
本文介绍了在Excel中插入行X行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一长串代码,如008.45等,需要多行文本来解释。我有代码列表,我想知道如何自动插入一行,第五行。例如

I have a long list of codes such as 008.45, etc that will need multiple lines of text to explain them. I have the list of codes and I would like to know how I can automatically insert a row every, say, fifth row. Example Below

1          
2
3
4
5
6
7
8
9
10...
100

每五行我想插入一个给定数量的我选择的行。我该怎么做?谢谢

Every five rows I would like to insert a given number of my choosing of rows. How can I do this? Thanks

推荐答案

您需要使用如下循环:

for i=1 to 100 step 1
  if i mod 5 = 0 then
     // Insert the rows
  end if
next i

这篇关于在Excel中插入行X行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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