Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have some data formatted like this

       A               B                C

     Phone           Name              Zip
1    111-222-3333    Steve Harvey      12345
2    111-222-3333    Steve Harvey      12354
3    222-333-4444    Barry Badgernaff  65423
4    222-333-4444    Barry Badgernaff  65432
5    333-444-5555    Jim Bob           36521
6    444-555-6666    Mickey Mouse      36541
7    666-777-8888    Donald Duck       39847
8    666-777-8888    Donald Duck       39874

What I'm looking to do is identify consecutive duplicate names. If there are duplicates, I want them ignored so I can filter them out

For example

       A               B                C        D

     Phone           Name              Zip     Result
1    111-222-3333    Steve Harvey      12345   Duplicate
2    111-222-3333    Steve Harvey      12354   Duplicate
3    222-333-4444    Barry Badgernaff  65423   Duplicate
4    222-333-4444    Barry Badgernaff  65432   Duplicate
5    333-444-5555    Jim Bob           36521   Not A Duplicate
6    444-555-6666    Mickey Mouse      36541   Not A Duplicate
7    666-777-8888    Donald Duck       39847   Duplicate
8    666-777-8888    Donald Duck       39874   Duplicate

What I've done is tried identifying these using =IF(B2=B1, "True", "False) but it slightly only does what I'm looking for and I end up getting false positives

What else can I try? I don't want to remove the data, just have a cell say if there are consecutive names in the data.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
184 views
Welcome To Ask or Share your Answers For Others

1 Answer

Your formula only checks the next row, but you should check the previous one as well.

Try this in B2 : =IF(OR(B2=B1, B2=B3), "True", "False")


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...