Finding Duplicate Values/ Different Sorting Methods

Hankmardukaas

New Member
Joined
Nov 2, 2023
Messages
10
Office Version
  1. 2021
Platform
  1. Windows
Hello,

I am looking to find duplicate values within a column of numbers, that also contain letters. These are used to identify recipes. I am trying to determine if we have different recipes that are using the same master reference number. What would be the best way to go about this? It is a large list just over 7k lines. Below is a screenshot of the data. Unfortunately, my admin permissions do not allow me to install the XL2BB plugin to provide a mini sheet in this post.

1698961693993.png

1698961643346.png


Any help/info is appreciated.

Thanks!
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Hi @Hankmardukaas, Welcome to the MrExcel forum. Please accept my warmest greetings and sincere hope that all is well.


According to your example, which ones are duplicates?

And, how do you want to identify duplicates? With a color, with a mark in column C?

Give duplicate examples, explain why they are duplicates for you and mark them as you want.



----- --
I hope to hear from you soon.
Respectfully
Dante Amor
----- --
 
Upvote 0
Thanks for the reply and help! I would like to have duplicates identified with a color. Would a mark in column c be better? I am not sure of the best way to go about this. Below is an example of duplicate recipes. I am trying to find any other recipes using the number '0522' within the list of data.

Scones, Cherry Choc Chunk (D) -FG 0522F0522F
Scones, Cherry Choc Chunk (D) 0522S0522S
 
Upvote 0
Put the following formula in C2 and copy it down.
Cells with "DUP" mean they are duplicated.

Dante Amor
ABC
1Recipe NameMaster ReferenceDuplicate
2Pastry strudel0770 
3Pastry turnover0771 
4Scones FG0772FDup
5Scones0772SDup
6Scones Blueberry FG0775FDup
7Scones Blueberry0775SDup
8Cookie peanut0776 
9Scones lemon FG0783FDup
10Scones lemon0783SDup
Hoja1
Cell Formulas
RangeFormula
C2:C10C2=IF(COUNTIF(B:B,LEFT(B2,4)&"*")>1,"Dup","")



----- --
Let me know the result and I'll get back to you as soon as I can.
Sincerely
Dante Amor
----- --
 
Upvote 0
This marked everything as a duplicate. The only two duplicates in the example below are the last two items. Any chance you could explain your formula as well? Thanks again, I appreciate the help.

R- Bread Country White 14851485Dup
R- Bread Seed Lover 14861486Dup
R- Bread Whole Wheat 14871487Dup
R- Coleslaw Spicy Peanut 14881488 RET 111Dup
SD, Grain, Lentil Swt & Spicy (QT) -FG (MT) 1489F1489FDup
SD, Grain, Lentil Swt and Spicy (QT) (MT) 1489S1489SDup
 
Upvote 0
Did you copy the formula correctly into cell C2?
Do you have blank spaces in column B after each master referece?

As you can see in my example, only what you commented is what marks it as a duplicate.
1699031972358.png


=IF(COUNTIF(B:B,LEFT(B2,4)&"*")>1,"Dup","")
What the formula does is take the first 4 characters of cell B2, count how many times those 4 characters appear in column B. If it is more than 1, then it is duplicate.


Here I put the same formula working with your new example:
Dante Amor
ABC
1Recipe NameMaster ReferenceDuplicate
2R- Bread Country White 14851485 
3R- Bread Seed Lover 14861486 
4R- Bread Whole Wheat 14871487 
5R- Coleslaw Spicy Peanut 14881488 RET 111 
6SD, Grain, Lentil Swt & Spicy (QT) -FG (MT) 1489F1489FDup
7SD, Grain, Lentil Swt and Spicy (QT) (MT) 1489S1489SDup
Hoja1
Cell Formulas
RangeFormula
C2:C7C2=IF(COUNTIF(B:B,LEFT(B2,4)&"*")>1,"Dup","")


;)
 
Upvote 0
Sorry for the late reply and thanks for the follow up. How did you sort the master reference column in that manner to have spaces before and after?
 
Upvote 0
When using the formula as shown it is marking items that are not duplicates. In the items below, 1502, does not have a duplicate number in my list.

Bar, Almond Butter -FG 6733F6733FDup
Bar, Almond Butter 6733S6733SDup
Bar, Apple (1/2 Pan) -FG 1503F1502Dup
Bar, Apple (1/2 Pan) 1503S1503SDup
Bar, Apple -FG 1298F1298FDup
Bar, Apple 1298S1298SDup
Bar, Apricot Linzer Nut (1/2 Pan) -FG 1531F1531FDup
Bar, Apricot Linzer Nut (1/2 Pan) 1531S1531SDup
Bar, Apricot Linzer Nut -FG 5390F5390FDup
Bar, Apricot Linzer Nut 5390S5390SDup
 
Upvote 0
When using the formula as shown it is marking items that are not duplicates. In the items below, 1502, does not have a duplicate number in my list.

Check the formula carefully, in my test the result is correct:

varios 09nov2023b.xlsm
ABC
1Recipe NameMaster ReferenceDuplicate
2Bar, Almond Butter -FG 6733F6733FDup
3Bar, Almond Butter 6733S6733SDup
4Bar, Apple (1/2 Pan) -FG 1503F1502 
5Bar, Apple (1/2 Pan) 1503S1503S 
6Bar, Apple -FG 1298F1298FDup
7Bar, Apple 1298S1298SDup
8Bar, Apricot Linzer Nut (1/2 Pan) -FG 1531F1531FDup
9Bar, Apricot Linzer Nut (1/2 Pan) 1531S1531SDup
10Bar, Apricot Linzer Nut -FG 5390F5390FDup
11Bar, Apricot Linzer Nut 5390S5390SDup
dam13
Cell Formulas
RangeFormula
C2:C11C2=IF(COUNTIF(B:B,LEFT(B2,4)&"*")>1,"Dup","")


🫡
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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