=IFERROR(INDEX(TEXT(E:E,"yyyy-mm-dd")&" "&F:F,SMALL(IF(C:C=J14,ROW(C:C)-MIN(ROW(C:C))+1),ROW(1:1))),"")
卡住C:C=J14 J14为人名
行数目修改 ROW(1:1)
J8-----J68
ROW 为1到41
#NEW
=IFERROR(INDEX(TEXT(E:E,"yy/mm/dd")&"【"&F:F&"h】",SMALL(IF(C:C=J11,ROW(C:C)-MIN(ROW(C:C))+1),ROW(1:1))),"")
#显示 24/12/12 【1h】
=IFERROR(INDEX(TEXT(加班记录!E:E,"yy/mm/dd")&"【"&加班记录!F:F&"h】",SMALL(IF((加班记录!C:C=A3)*(加班记录!E:E>B1),ROW(加班记录!C:C)-MIN(ROW(加班记录!C:C))+1,""),ROW(1:1))),"")
加入日期比较
脚本生成
import os
txt_1="""=IFERROR(INDEX(TEXT(E:E,"yy/mm/dd")&"【"&F:F&"h】",SMALL(IF(C:C=J"""
txt_2=""",ROW(C:C)-MIN(ROW(C:C))+1),ROW("""
txt_3="""))),"")"""
f=open("a.html","w")
f.write("<table>")
for j in range(11,72):
f.write("<tr>")
for i in range(1,42):
txt=txt_1+str(j)+txt_2+str(i)+":"+str(i)+txt_3
f.write("<td>"+txt+"</td>")
f.write("<\tr>")
f.write("</table>")
f.close()
#J需要设置人员开始位置与结束位置J11为开始J71为结束位置(减去1)