简体   繁体   English

在Excel中使用什么公式将一个单元格上丢失的文本返回到另一个单元格

[英]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+shiftenter 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.

相关问题 Excel公式搜索一个单元格并替换另一单元格中的文本 - Excel Formula to Search One Cell and Replace Text in Another Cell 我需要使用什么公式才能将一个单元格中的文本从工作表链接到另一个工作表中的单元格? - What formula do I need to use in order to link text in one cell from sheet to a cell in another sheet? 在Excel中,我可以使用什么公式在一个单元格中重复文本,并在连续的行中重复指定的时间? - In Excel, what formula can I use to repeat text in one cell, for a specified amount of times in consecutive rows? Excel 公式 - 如果为真,则返回文本和单元格值 - Excel formula - IF true, return a text and cell value 如何在Microsoft Excel中将一个单元格中的文本作为另一个单元格中的公式计算? - How can I calculate the text in one cell as a formula in another cell in microsoft excel? Excel 中的高级公式/基于另一个单元格向单元格添加文本 - Advanced formula in Excel / Adding text to a cell based on another cell 用于使用另一个单元格中包含的文本引用单元格地址的 Excel 公式 - Excel Formula for referencing a cell address using text contained in another cell Excel-如何创建公式以将单元格返回到另一个公式的结果右侧 - Excel - How to create a formula to return a cell to the right of the result of another formula 我将使用什么公式来计算一个单元格中的值,但前提是另一个单元格为空白? - What formula would I use to count values in one cell, but only if another cell is blank? 根据另一个单元格中的值编辑一个单元格中的部分文本的公式 - Formula to edit part of a text in one cell based on an values in another cell
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM