参考下图。使用此公式获取缺少的数字:
=sumproduct(--(a2:a40<gt;a1:a39))*rows(c2:c12)-rows(a2:a40)
将A列中数据的最后一个单元格更改为A40,并将A39更改为second to last.cell.
然后,将此帮助器列作为数组公式(ctrl>+shift>+enter)输入到1列范围中,行数与上述公式返回的行数相同(它将缺少的对编码为单个数字)。我把它输入到d4:d8:。
=small(iferror(0>match(index(A2:A440,index(small(if(A2:A440<>A1:A39,行(A2:A440)-行(A1)),行(间接(“1:”&sum(--(A2:A440<>A1:A39))))))),int((RoRoRoRoRor(0>match(0>match(index(A2:A440:A440,A440,索引(sma(小(if(如果(A2:A440:A40:A40)(if(A2:A440:A440<>lt>lt;<<&&&&>gt;A1 c12,mod((行(间接(“1:”&行(c2:c12)*sum(--(a2:a40<>a1:a39))-1)、行(c2:c12))+1)、a2:a40&b2:b40,0,0)、索引(小(if(a2:a40<>a1:a39、行(a2:a40)-行(a1))、行(间接(1:“&sum(--(a40<<>a40<<>a1:a22)))、int((行(间接(1:“&行(c2:c2:c2:c12))-1)、行(--(a2:a40&a40<<<<<<>gt;a1:a39)))-1)/行(c2:c12))+1)*行(c2:c12)+mod((row(directive)(1:“行(c2:c12)*和(--(a2:a40<>a1:a39)))-1)、行(c2:c12))+1)、行(directive(“1”:和(--(a2:a40<>a1:a39))*行(c2:c12)-行(a2:a40)))
再次,将A列中数据的最后一个单元格更改为A40,并将A39更改为second to last.
接下来,将此公式输入到e4并向下填充:
=索引($A$2:$A$40,int(d4/行($C$2:$C$12)))
最后,将此公式输入f4
并向下填充:
=index($c$2$c$12,mod(d4,rows($c$2$c$12)))
更改A40
到A列中数据的最后一个单元格A39
致倒数第二单元格。
然后将此助手列作为数组公式输入(Ctrl键+轮班+输入)一列范围内的行数与上面的公式返回的行数相同(它将丢失的对编码为一个数字)。我把它输入D4:D8
以下内容:
=SMALL(IFERROR(0>MATCH(INDEX(A2:A40,INDEX(SMALL(IF(A2:A40<>A1:A39,ROW(A2:A40)-ROW(A1)),ROW(INDIRECT("1:"&SUM(--(A2:A40<>A1:A39))))),INT((ROW(INDIRECT("1:"&ROWS(C2:C12)*SUM(--(A2:A40<>A1:A39))))-1)/ROWS(C2:C12))+1))&INDEX(C2:C12,MOD((ROW(INDIRECT("1:"&ROWS(C2:C12)*SUM(--(A2:A40<>A1:A39))))-1),ROWS(C2:C12))+1),A2:A40&B2:B40,0),INDEX(SMALL(IF(A2:A40<>A1:A39,ROW(A2:A40)-ROW(A1)),ROW(INDIRECT("1:"&SUM(--(A2:A40<>A1:A39))))),INT((ROW(INDIRECT("1:"&ROWS(C2:C12)*SUM(--(A2:A40<>A1:A39))))-1)/ROWS(C2:C12))+1)*ROWS(C2:C12)+MOD((ROW(INDIRECT("1:"&ROWS(C2:C12)*SUM(--(A2:A40<>A1:A39))))-1),ROWS(C2:C12))+1),ROW(INDIRECT("1:"&SUM(--(A2:A40<>A1:A39))*ROWS(C2:C12)-ROWS(A2:A40))))
再次,改变A40型
到A列中数据的最后一个单元格A39型
致倒数第二单元格。
接下来,将此公式输入到E4
并填写:
=INDEX($A$2:$A$40,INT(D4/ROWS($C$2:$C$12)))
最后,将此公式输入到F4
并填写:
=INDEX($C$2:$C$12,MOD(D4,ROWS($C$2:$C$12)))