How to automatically insert a blank row after a group of data

前端 未结 7 1133
迷失自我
迷失自我 2020-11-28 11:33

I have created a sample table below that is similar-enough to my table in excel that it should serve to illustrate the question. I want to simply add a row after each distin

7条回答
  •  北海茫月
    2020-11-28 12:06

    This won't work if the data is not sequential (1 2 3 4 but 5 7 3 1 5) as in that case you can't sort it.

    Here is how I solve that issue for me:

    Column A initial data that needs to contain 5 rows between each number - 5 4 6 8 9

    Column B - 1 2 3 4 5 (final number represents the number of empty rows that you need to be between numbers in column A) copy-paste 1-5 in column B as long as you have numbers in column A.

    Jump to D column, in D1 type 1. In D2 type this formula - =IF(B2=1,1+D1,D1) Drag it to the same length as column B.

    Back to Column C - at C1 cell type this formula - =IF(B1=1,INDIRECT("a"&(D1)),""). Drag it down and we done. Now in column C we have same sequence of numbers as in column A distributed separately by 4 rows.

提交回复
热议问题