excel - 如果单元格值存在于另一列中,则保留行

标签 excel

如果我在 Excel 中有以下 3 列布局...

column1  column2    column3
one      three      info about three

two      one        info about one

three    two        info about two

four     six        info about six

         seven      info about seven

         eight      info about eight

...如何删除或隐藏或删除第 2 列中没有第 1 列值的任何行?

我的最终结果应该是这样的......
column1  column2    column3
one      

two      one        info about one

three    two        info about two

four     

最佳答案

  • 在“第 2 列”的右侧插入一个新列
  • 将“查找”标题添加到此新列
  • 将此公式插入此新列的第 2 行:=if(countif(A:A,B2) > 0,"true","false")
  • 在所有剩余行中填写该公式
  • 全选并激活数据过滤器
  • 按“真”过滤“查找”列

  • (注意:您可能必须在“查找”列上复制并“仅粘贴 > 值”才能让 excel 真正识别查找结果)

    关于excel - 如果单元格值存在于另一列中,则保留行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22413862/

    相关文章:

    excel - 循环访问集合时尝试设置自定义对象时出错

    excel - 使用 VBA 从列表中重命名多个工作表

    sql - 在excel vba中使用数组或字典作为sql中的from子句

    excel - 格式刷不工作 - 条件格式

    excel - 如何为 Dimmed 变量建立第三个变量

    excel - 如何在单元格中添加过滤和排序按钮?

    mysql - 多个数据库上的单个 MySQL 查询

    .net - 100 万行数据的数据清洗 - .Net

    excel - 我可以在同一工作簿中同时使用 Office 脚本和 VBA 宏吗?

    vba - 查找所有公式并将它们向下拖动 (FillDown) 到某个行号,从而跳过其中包含值的单元格?