本帖最后由 高个子 于 2023-6-1 10:18 编辑
- =UNIQUE(TOCOL(IF(B1:E1="姓名",B2:E6,NA()),3,1))
复制代码
要是你能升级至365预览版,公式很短,比较好维护,若不能升级则只能用传统套路。。(写在e12)
- =IFERROR(INDIRECT(TEXT(MOD(MIN(IF((COUNTIF(E$11:E11,B$2:E$6)=0)*(B$1:E$1="姓名"),ROW($2:$6)*100+COLUMN(B:E)*100000001)),10^4),"R0C00"),),"")
复制代码- =LET(x,B$2:E$6,IFERROR(INDIRECT(TEXT(MOD(MIN(IF((COUNTIF(e$11:e11,x)=0)*(B$1:E$1="姓名"),ROW(x)*100+COLUMN(x)*100000001)),10^4),"R0C00"),),""))
复制代码
若你可以先行后列,则公式可以更短一些(写在e12)
- =FILTERXML("<a><b>"&TEXTJOIN("</b><b>",,IF(B1:E1="姓名",B2:E6,""))&"</b></a>","a/b[preceding::*=.=0]")
复制代码- =IFERROR(INDIRECT(TEXT(MIN(IF((COUNTIF(E$11:E11,$B$2:$E$6)=0)*(B$1:E$1="姓名"),ROW($2:$6)*100+COLUMN(B:E))),"R0C00"),),"")
复制代码- =LET(x,B$2:E$6,IFERROR(INDIRECT(TEXT(MIN(IF((COUNTIF(E$11:E11,x)=0)*(B$1:E$1="姓名"),ROW(x)*100+COLUMN(x))),"R0C00"),),""))
复制代码
|