[英]What formula to use in Excel to return missing text on one cell to another cell
I am comparing two columns ( A and B) and I wanted to return the missing text/value from column A . 我正在比较两列(A和B),我想返回A列中缺少的文本/值。 MY reference column is B. 我的参考资料栏是B。
Column A Column B Column C
ana ana
ray ray
jack jack
bryan
You could use a formula like this one to compare the columns and return the value of a cell in A if that value is not present in B, but you would have to copy the formula down for all the rows in which column A has data: 您可以使用像这样的公式来比较列,如果B中不存在该单元格的值,则返回A中单元格的值,但是您必须将公式向下复制到A列中包含数据的所有行:
=if(iserror(vlookup(a1, B:B, 1, false)), a1, "") = if(iserror(vlookup(a1,B:B,1,false)),a1,“”)
If you want the absent ColB entries to be listed sequentially in ColC, then the following array formula -- entered by holding down ctrl+shift
while hitting enter
should work. 如果要在ColC中按顺序列出缺少的ColB条目,则下面的数组公式-通过在按住enter
同时按住ctrl+shift
来enter
。 In the formula below, ColA and ColB range references must be the same size . 在下面的公式中,ColA和ColB范围引用必须具有相同的大小 。 Enter the formula in C1 and fill down as far as needed. 在C1中输入公式,然后根据需要填写。
C1: =IFERROR(INDEX(ColA,-ROW(ColA)+1+SMALL((COUNTIF(ColA,ColB)=0)*(LEN(ColA)>0)*ROW(ColA),ROWS($1:1)+SUM(--((COUNTIF(ColA,ColB)=0)*(LEN(ColA)>0)=0)))),"")
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.