删除重复值,但保留其余的行值 [英] remove duplicate value but keep rest of the row values

查看:197
本文介绍了删除重复值,但保留其余的行值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个这样的excel表(csv):





,我希望输出(制表符分隔)如下所示:





基本上: p>


  • 用空格替换重复项,但


    • 如果 col6 值与上一行不同于同样的
      col1
      值,所有数据字段都应该包含在内。




我正在努力创建一个可以做到的公式。
如果我尝试删除重复,它将删除该值并将值向上移动一行。我想要它删除重复,但不要移动值。

解决方案

尝试这个(注意,你需要一个空白的顶行(编辑:其实你没事,你有一个标题行)):

  = IF(A2→A1,A2,IF(D2→D1,A2, )
= IF(A2→A1,B2,IF(D2→D1,B2,...))
= IF(A2 A1,C2,IF(D2& > D1,C2,))
etc

下来



编辑:注意到需要额外的条件。


I have a excel sheet(csv) like this one:

and I want the output(tab delimited) to be like this:

Basically:

  • replace duplicates with blanks but
    • if col6 value is different from the previous row for the same col1 value, all the data fields should be included.

I am struggling to create a formula which would do this. If I try to "Remove Duplicates" it removes the value and shifts the values up one row. I want it to remove the duplicates but not shift the values up.

解决方案

Try this (note, you need a blank top row (edit: Actually, you're fine you have a header row)):

=IF(A2<>A1,A2,IF(D2<>D1,A2,""))
=IF(A2<>A1,B2,IF(D2<>D1,B2,""))
=IF(A2<>A1,C2,IF(D2<>D1,C2,""))
etc

in the top row and drag down

Edit: Noticed you needed an additional condition.

这篇关于删除重复值,但保留其余的行值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆