半失能=COUNTIFS($A$3:$A$103,"供养",$G$3:$G$103,U3)
失能=COUNTIFS($A$3:$A$103,"供养",$G$3:$G$103,U5)
全自理=COUNTIFS($A$3:$A$103,"供养",$G$3:$G$103,U7)
年龄大于85岁人数=COUNTIFS($A$3:$A$103,"供养",$F$3:$F$103,">85")
年龄小于60岁人数=COUNTIFS($A$3:$A$103,"供养",$F$3:$F$103,"<60")
年龄最大=MAXIFS($F$3:$F$103,$A$3:$A$103,"供养")
年龄最小=MINIFS($F$3:$F$103,$A$3:$A$103,"供养")
司龄最大(数组三键)=DATEDIF(LOOKUP(,0/((A3:A103="供养")*(--I3:I103=MIN(IF(A3:A103="供养",--I3:I103)))),I3:I103),TODAY(),"Y")&"年"&DATEDIF(LOOKUP(,0/((A3:A103="供养")*(--I3:I103=MIN(IF(A3:A103="供养",--I3:I103)))),I3:I103),TODAY(),"YM")&"月"&DATEDIF(LOOKUP(,0/((A3:A103="供养")*(--I3:I103=MIN(IF(A3:A103="供养",--I3:I103)))),I3:I103),TODAY(),"MD")&"日"
司龄最小(数组三键)=DATEDIF(LOOKUP(,0/((A3:A103="供养")*(--I3:I103=MAX(IF(A3:A103="供养",--I3:I103)))),I3:I103),TODAY(),"Y")&"年"&DATEDIF(LOOKUP(,0/((A3:A103="供养")*(--I3:I103=MAX(IF(A3:A103="供养",--I3:I103)))),I3:I103),TODAY(),"YM")&"月"&DATEDIF(LOOKUP(,0/((A3:A103="供养")*(--I3:I103=MAX(IF(A3:A103="供养",--I3:I103)))),I3:I103),TODAY(),"MD")&"日"
去世人中司龄最小(数组三键)=DATEDIF(LOOKUP(,0/(IF(Q3:Q103="去世",R3:R103-I3:I103)=MIN(IF(Q3:Q103="去世",R3:R103-I3:I103))),I3:I103),LOOKUP(,0/(IF(Q3:Q103="去世",R3:R103-I3:I103)=MIN(IF(Q3:Q103="去世",R3:R103-I3:I103))),R3:R103),"Y")&"年"&DATEDIF(LOOKUP(,0/(IF(Q3:Q103="去世",R3:R103-I3:I103)=MIN(IF(Q3:Q103="去世",R3:R103-I3:I103))),I3:I103),LOOKUP(,0/(IF(Q3:Q103="去世",R3:R103-I3:I103)=MIN(IF(Q3:Q103="去世",R3:R103-I3:I103))),R3:R103),"YM")&"月"&DATEDIF(LOOKUP(,0/(IF(Q3:Q103="去世",R3:R103-I3:I103)=MIN(IF(Q3:Q103="去世",R3:R103-I3:I103))),I3:I103),LOOKUP(,0/(IF(Q3:Q103="去世",R3:R103-I3:I103)=MIN(IF(Q3:Q103="去世",R3:R103-I3:I103))),R3:R103),"MD")&"日"
去世人中司龄最大(数组三键)=DATEDIF(LOOKUP(,0/(IF(Q3:Q103="去世",R3:R103-I3:I103)=MAX(IF(Q3:Q103="去世",R3:R103-I3:I103))),I3:I103),LOOKUP(,0/(IF(Q3:Q103="去世",R3:R103-I3:I103)=MAX(IF(Q3:Q103="去世",R3:R103-I3:I103))),R3:R103),"Y")&"年"&DATEDIF(LOOKUP(,0/(IF(Q3:Q103="去世",R3:R103-I3:I103)=MAX(IF(Q3:Q103="去世",R3:R103-I3:I103))),I3:I103),LOOKUP(,0/(IF(Q3:Q103="去世",R3:R103-I3:I103)=MAX(IF(Q3:Q103="去世",R3:R103-I3:I103))),R3:R103),"YM")&"月"&DATEDIF(LOOKUP(,0/(IF(Q3:Q103="去世",R3:R103-I3:I103)=MAX(IF(Q3:Q103="去世",R3:R103-I3:I103))),I3:I103),LOOKUP(,0/(IF(Q3:Q103="去世",R3:R103-I3:I103)=MAX(IF(Q3:Q103="去世",R3:R103-I3:I103))),R3:R103),"MD")&"日"
|