Removing duplicates rows

Gcsingh90

New Member
Joined
Dec 6, 2022
Messages
12
Office Version
  1. 365
Platform
  1. Windows
Data
Tier CategoryName
Tier 1Tom
Tier 1Tom
Tier 1Harry
Tier 1Rafa
Tier 1Daniel
Tier 2Tom
Tier 2Harry
Tier 2Harry
Tier 2CAN ATALAY
Tier 2HANN-WEN SHEU
Tier 3Oktar
Tier 3Miria
Tier 3Harry
Tier 3CAN ATALAY
Tier 3Tom
Tier 3Rafa
Tier 3Oktar

Required Output
Tier CategoryName
Tier 1Tom
Tier 1Tom
Tier 1Harry
Tier 1Rafa
Tier 1Daniel
Tier 2Tom
Tier 2Harry
Tier 2Harry
Tier 2CAN ATALAY
Tier 2HANN-WEN SHEU
Tier 3Oktar
Tier 3Miria
Tier 3Oktar

For simplification just using 2 columns from the whole table, column one has Tier category and Column 2 has corresponding names. Trying to remove duplicates From the table for Tier C, for the names which are present in Tier 1 or Tier 2.

Tier 1,Tier 2 , Tier 3 can have duplicates. But a name present in Tier 2 and Tier 1 should not repeat in Tier 3.

Trying to automate this when ever new data get pasted in this table. Automatically it should remove Tier 1 and Tier 2 names which repeated for only Tier 3 category and return the distinct names for Tier 3. I tried the following. Need to complete the formula.

IF(COUNTIFS($B$2:B2,B2,$A$2:A2,"Tier A")>=1,"Keep","Remove")
IF(COUNTIFS($B$2:B100,B100,$A$2:A100,"Tier B")>=1,"Keep","Remove")

Need to solve this with the help of formula only. Any help is appreciated.
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Tier 1 has Tom and Tier 2 has Harry if you notice as Tier 1 and Tier 2 can have duplicate names/rows i.e., no need to remove the rows we can keep the exact for tier 1 and 2. But specifically for tier C, I need to consider only unique names it can also have duplicate names present in tier c itself thats why Tier 3 has Oktar, but cannot have names which are already occurred in Tier 1 or 2 hence all other names removed. Hope this helps.
 
Last edited:
Upvote 0
I am not sure if my approach was correct. I was intending to check the names in Tier 1 and Tier 2 from top to bottom and compare with Tier 3 names, where Tier 3 will exclude the names which can be found in Tier 1 and 2 and return the unique names present in Tier 3
 
Upvote 0
Why do your formulas have Tier A and Tier B, but in the table, they're labeled Tier 1 and Tier 2?
The required outcome does not remove duplicates, so your heading is confusing.
Can the data be sorted? If so, If Tier 3 items should not be in Tier 1 or 2, sort the data and the countif the names in tier 3 appear above them.
 
Upvote 0
Sorry, Tier A = Tier 1 and Tier B = Tier 2. Correct, the heading is confusing I just want to remove the names in Tier 3 which are repeated in Tier 1 or Tier 2. I doubt the data can be sorted as data going to get copy and pasted every time and it should automatically remove names for Tier 3 category which got repeated in Tier 1 or 2. Hope this helps.
 
Upvote 0
You could use a formula to identify if it's a Tier 3 and if so, countifs to see if the name appears in a different Tier, flag it to delete then deleting it.
Excel Formula:
=IF(A2<>"Tier 3","",IF(COUNTIFS(B:B,B2,A:A,"<>Tier 3")<>0,"Delete",""))
Assuming the Tier is in Column A and the name is in Column B
 
Upvote 0
Solution

Forum statistics

Threads
1,223,885
Messages
6,175,184
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top