May 11 2021 11:23 PM
Hi all!
New to the community and really hoping someone can help!
I currently have 2 sheets in Excel (I think 365) that I am hoping to find duplicates on, let's just call them Sheet 1 and Sheet 2 for simplicity sake.
I need to find out whether the File ID (Column 2/Sheet 1) and the Part (Column 3/Sheet 1) are duplicate values of the File ID (Column 3/Sheet 2) and (Column 4/Sheet 2).
So the following example would be a duplicate:
Column 2 / Sheet 1 was 123456 AND Column 3 / Sheet 1 was 4
AND
Column 3 / Sheet 2 was 123456 AND Column 3 / Sheet 1 was 4
HOWEVER this example would NOT:
Column 2 / Sheet 1 was 123456 AND Column 3 / Sheet 1 was 4
AND
Column 3 / Sheet 2 was 123456 AND Column 3 / Sheet 1 was 2
Can anyone help? I have a thousand rows to check and can't afford to do each one individually!
Thanks 🙂
May 12 2021 12:55 AM - edited May 12 2021 08:21 PM
If
So the following example would be a duplicate:
Column 2 / Sheet 1 was 123456 AND Column 3 / Sheet 1 was 4
AND
Column 3 / Sheet 2 was 123456 AND Column 3 / Sheet 1 was 4
then what is on column 2 sheet 1? <==== my question might seem irrelevant but believe me it is.
May 17 2021 07:35 PM - edited May 19 2021 09:43 PM
Sheet 1:
File Name | ID | Part |
A14141 | 1 | |
A32691 | 2 |
Sheet 2:
File Name | ID | Part |
A14141 | 6 | |
A32691 | 2 |
Hopefully this helps!
So Row one would NOT be a duplicate because it is a different part - but row 2 would because both column 2 AND 3 match
May 17 2021 07:39 PM
Hi @Mollie1247
If both worksheets are formatted that way you can use power query to remove duplicates in a snap.
May 17 2021 07:46 PM
May 17 2021 07:54 PM
May 17 2021 10:39 PM
May 17 2021 10:46 PM
Hi @Mollie1247 can you share it?
May 17 2021 10:48 PM
May 17 2021 10:52 PM
May 18 2021 02:39 AM
If the purpose is to find duplicates you may add helper column to Sheet2 with formula like
=COUNTIFS(Sheet1!B:B,B2:B300,Sheet1!C:C,C2:C300)
(assuming you are on 365) and filter on values not equal to zero, it returns duplicates.
If to merge without duplicates it's better to convert ranges in the sheets into structured tables and merge with
=LET(
fst, FILTER(Table1,COUNTIFS(Table1[ID],Table2[ID],Table1[Part],Table2[Part])),
snd, FILTER(Table2,COUNTIFS(Table2[ID],Table1[ID],Table2[Part],Table1[Part])),
rfst, ROWS(fst),
rsnd, ROWS(snd),
k, SEQUENCE(rfst+rsnd),
IF(k<=rfst, INDEX(fst, k, {1,2}), INDEX(snd, k-rfst, {1,2}))
)
May 19 2021 09:47 PM
May 19 2021 10:27 PM
May 20 2021 08:48 AM
How COUNTIFS() works is here
COUNTIFS function - Office Support (microsoft.com)
How to use the Excel COUNTIFS function | Exceljet
Why it doesn't work in your case - hard to say without the sample file.
If you need to highlight duplicates you may apply conditional formatting rule with practically the same formula
May 20 2021 11:01 AM
Hi @Mollie1247
From what I can understand in how you're describing the geography of Sheet1, this is how it looks:
and Sheet2, this is how it looks:
My question is:
are all the other Sheets similar to Sheet2? Thanks