本帖最后由 liyanghu 于 2019-12-31 13:13 编辑
改进了一下,可以复制下拉了,就是有点太长了
J3=IF(SUM(N(INDIRECT(TEXT(MIN(IF((INDIRECT("rc[-5]"&":"&"r[8]c[-1]",)<>"")*(COUNTIF(J$2:J2,INDIRECT("rc[-5]"&":"&"r[8]c[-1]",))=0),ROW(INDIRECT("rc[-5]"&":"&"r[8]c[-5]",))*100+COLUMN(INDIRECT("rc[-5]"&":"&"rc[-1]",)),4^8)),"R0C00"),)&""=OFFSET(D3,IF(D3=1,,-D2),1,9,5)))=0,"",INDIRECT(TEXT(MIN(IF((INDIRECT("rc[-5]"&":"&"r[8]c[-1]",)<>"")*(COUNTIF(J$2:J2,INDIRECT("rc[-5]"&":"&"r[8]c[-1]",))=0),ROW(INDIRECT("rc[-5]"&":"&"r[8]c[-5]",))*100+COLUMN(INDIRECT("rc[-5]"&":"&"rc[-1]",)),4^8)),"R0C00"),)&"")
K3=IF(J3="","",SUM(N(J3=OFFSET(D3,IF(D3=1,,-D2),1,9,5))))
|