Find Duplicates with Multiple Conditions

RattlingCarp3048

Board Regular
Joined
Jan 12, 2022
Messages
183
Office Version
  1. 365
Platform
  1. Windows
Not really sure what will be the best method for what i am trying to do so i am open to all possibilities (i.e. formula, filter, conditional formatting, VBA, combination of, etc...)

Basically i have 2 main columns where one contains a worklist and the other a case number. The worklists i use the most i have highlighted yellow (there are 13 different ones in total) and the least used are blue (there are 18 different ones in total). The case numbers i have a conditional format set to highlight the duplicate cases red. The colors are not important, they were merely an attempt to help filter. I need to somehow find all cases where the case is a duplicate (red) but the same case does NOT contain a yellow cell.

in this example set i need to somehow filter down or somehow call out only case DL245024M because it is a duplicate value AND does not contain one of my most used worklists (yellow).

worklist case number
APTHINDL245007M
APTHPVRDL245007M
APEHPVDL245024M
APEHPVRDL245024M
APTHINDL245026M
1715128852215.png
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
How do you determine the "most" vs "least" i.e. the yellow and the blue cells?
 
Upvote 0
How do you determine the "most" vs "least" i.e. the yellow and the blue cells?
for this purpose i filtered the column and color coded them.

generally speaking how do i know which is which? i know them off the top of my head but i can easily write them down into a list if need be.
 
Upvote 0
Maybe this.
Book1
ABCD
1APTHINDL24007MDL245024M
2APTHPVRDL24007MDL245024M
3APEHPVDL245024M
4APEHPVRDL245024M
5APTHINDL245026M
6APOTDL245025M
Sheet1
Cell Formulas
RangeFormula
D1:D2D1=LET(f,FILTER(B1:B6,A1:A6<>"APTHIN"),u,UNIQUE(f,,1),FILTER(f,ISERROR(XLOOKUP(f,u,u))))
Dynamic array formulas.
 
Upvote 0
Solution
This seems to be working :) would you mind explaining how this formula works in case i need to build it again in the future? the only part i understand is the FILTER(B1:B6,A1:A6<>"APTHIN") piece :LOL:
 
Upvote 0
1) Filter out the APTHIN
2) Unique gets the distinct rows that are not duplicated.
3) It's doing a lookup between the unique list (2) and the filtered list (1)
If it's missing then it'll return an error. This means those values are duplicated since it's not in the unique list.
4) I filtered the filtered list in (1) a second time but with the condition of an error from step (3). This gives you back the duplicated values.
 
Upvote 0
1) Filter out the APTHIN
2) Unique gets the distinct rows that are not duplicated.
3) It's doing a lookup between the unique list (2) and the filtered list (1)
If it's missing then it'll return an error. This means those values are duplicated since it's not in the unique list.
4) I filtered the filtered list in (1) a second time but with the condition of an error from step (3). This gives you back the duplicated values.
Thank you! I added in all the other worklists and it seems to be working. Thank you sooooo much 😁
 
Upvote 0
You're welcome.
Hello again, i was wrong in my last message. adding in the additional worklists is not working. it returns a 0. i tried both and (*) as well as or (+) but still a 0. how do i add in all the additional worklists?

=LET(f,FILTER(D2:D100000,(C2:C100000<>"APTHIN")*(C2:C100000<>"APTIS1")),u,UNIQUE(f,,1),FILTER(f,ISERROR(XLOOKUP(f,u,u))))

=LET(f,FILTER(D2:D100000,(C2:C100000<>"APTHIN")+(C2:C100000<>"APTIS1")),u,UNIQUE(f,,1),FILTER(f,ISERROR(XLOOKUP(f,u,u))))
 
Upvote 0

Forum statistics

Threads
1,216,113
Messages
6,128,905
Members
449,477
Latest member
panjongshing

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