Excel IF -eq“Something”在下一个可用空格中写入
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Excel IF -eq“Something”在下一个可用空格中写入相关的知识,希望对你有一定的参考价值。
如果声明为True,我在编写一个公式时会遇到一些麻烦,该公式将填充下一个可用的空白单元格。
如果G列等于“#Number”,则写入“This Equals#”...但我只想在一个单元格上使用“This Equals#”,而不是全部4(A1; A2; A3; A4)。另外,如果'A1'已经在'A2'中写入“Something”
专栏:A; B; C; G
A:
=IF(G1="#1","This Equals 1",IF(G1="#3","This Equals 3",IF(G1="#5","This Equals 5",IF(G2="#1","This Equals 1",IF(G2="#3","This Equals 3",IF(G2="#5","This Equals 5",IF(G3="#1","This Equals 1",IF(G3="#3","This Equals 3",IF(G3="#5","This Equals 5",IF(G4="#1","This Equals 1",IF(G4="#3","This Equals 3",IF(G4="#5","This Equals 5"))))))))))))
B:
=IF(G1="#2","This Equals 2",IF(G1="#4","This Equals 4",IF(G1="#6","This Equals 6",IF(G2="#2","This Equals 2",IF(G2="#4","This Equals 4",IF(G2="#6","This Equals 6",IF(G3="#2","This Equals 2",IF(G3="#4","This Equals 4",IF(G3="#6","This Equals 6",IF(G4="#2","This Equals 2",IF(G4="#4","This Equals 4",IF(G4="#6","This Equals 6"))))))))))))
C:
=IF(G1="#7","This Equals 7",IF(G1="#8","This Equals 8",IF(G1="#9","This Equals 9",IF(G2="#7","This Equals 7",IF(G2="#8","This Equals 8",IF(G2="#9","This Equals 9",IF(G3="#7","This Equals 7",IF(G3="#8","This Equals 8",IF(G3="#9","This Equals 9",IF(G4="#7","This Equals 7",IF(G4="#8","This Equals 8",IF(G4="#9","This Equals 9"))))))))))))
无论在列G上添加数字的顺序无关紧要,但仍应填充下一个可用单元格。也许使用excel公式无法做到这一点?这就是我想弄清楚的。如果我要问的是有意义的还是需要进一步说明,请告诉我。
基本上,“#”代表代码/产品编号,3列代表类别。
答案
A1:
=IFERROR("This Equals " & SUBSTITUTE(INDEX($G:$G,AGGREGATE(15,6,ROW($G$1:$G$4)/(($G$1:$G$4="#1")+($G$1:$G$4="#3")+($G$1:$G$4="#5")),ROW(1:1))),"#",""),"")
乙1:
=IFERROR("This Equals " & SUBSTITUTE(INDEX($G:$G,AGGREGATE(15,6,ROW($G$1:$G$4)/(($G$1:$G$4="#2")+($G$1:$G$4="#4")+($G$1:$G$4="#6")),ROW(1:1))),"#",""),"")
C1:
=IFERROR("This Equals " & SUBSTITUTE(INDEX($G:$G,AGGREGATE(15,6,ROW($G$1:$G$4)/(($G$1:$G$4="#7")+($G$1:$G$4="#8")+($G$1:$G$4="#9")),ROW(1:1))),"#",""),"")
然后复制那些公式。
以上是关于Excel IF -eq“Something”在下一个可用空格中写入的主要内容,如果未能解决你的问题,请参考以下文章