根据 2 列值删除重复行

时间:2021-03-27 10:29:14

标签: excel excel-formula duplicates delete-row worksheet-function

我有一张包含 8 列 A 到 H 和超过 1000 行的工作表。我想删除 A 列中具有重复值的所有行,并检查 H 列是否为空(零值)单元格。

如果 H 列为空,则删除整行,而不是 H 列中有值的行。

示例 -
第 1 行在 A 列中有 ABC,在 H 列中有 MyText
第 2 行在 A 列中有 ABC 而在 H 列中没有值
删除第 2 行作为重复项。

1 个答案:

答案 0 :(得分:1)

[drstahp@DrSTAHP test]$ sudo ./test Address of some value: 1BA1245C INPUT:1BA1245C Pointer points to: 1BA1245C Segmentation fault [drstahp@DrSTAHP test]$ ^C [drstahp@DrSTAHP test]$ 中使用此公式:

I1

然后只删除在 =AND(COUNTIF(A:A,A1)>1,H1=0) 列中获得 I 的行


详细步骤

  1. 创建公式:

enter image description here

  1. 在顶部创建 1 行

  2. 选择包括第一行在内的所有内容

  3. “数据”->“过滤器”

  4. 在第 TRUE 列上只留下 TRUE

  5. 选择这些行:

enter image description here

  1. “首页”->“删除”

enter image description here