Find Duplicates Across Range of Cells Within a Row

gshamilt

New Member
Joined
Sep 24, 2008
Messages
45
I have a range of cells in a row I would like to check for text duplicates. See the image down below. I'm working with about 500 rows. I would love a formula to give me the result I have in cell G2. Sometimes a row may have no duplicates, 1 duplicate, 2 duplicates, 3 duplicates, etc.

If that is too difficult with a formula, simply marking which rows have a duplicate in cell G2 would also work. This would be my 2nd preferred option.

Conditional formatting where I highlight which cells are duplicates would be a 3rd preferred option that would also work.

Can someone help me with this? I'm struggling on it. Thanks!

Excel Duplicates.jpg
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
What version of Excel do you have?
A fourth option could be with a macro?
 
Upvote 0
This could be an alternative for your first option.

Book1
ABCDEFG
1Cat1Cat2Cat3Cat4Cat5Cat6Duplicate
2BooksCookbooksArt booksHardcover BooksBooksArt booksBooks, Art books,
3BooksCookbooksArt booksCookbooksBooksArt booksBooks, Cookbooks, Art books,
sheet
Cell Formulas
RangeFormula
G2:G3G2=IF(COUNTIF(A2:F2,A2)>1,A2&", ","")&IF(COUNTIF(B2:F2,B2)>1,B2&", ","")&IF(COUNTIF(C2:F2,C2)>1,C2&", ","")&IF(COUNTIF(D2:F2,D2)>1,D2&", ","")&IF(COUNTIF(E2:F2,E2)>1,E2&", ","")
 
Upvote 0
This could be an alternative for your first option.

Book1
ABCDEFG
1Cat1Cat2Cat3Cat4Cat5Cat6Duplicate
2BooksCookbooksArt booksHardcover BooksBooksArt booksBooks, Art books,
3BooksCookbooksArt booksCookbooksBooksArt booksBooks, Cookbooks, Art books,
sheet
Cell Formulas
RangeFormula
G2:G3G2=IF(COUNTIF(A2:F2,A2)>1,A2&", ","")&IF(COUNTIF(B2:F2,B2)>1,B2&", ","")&IF(COUNTIF(C2:F2,C2)>1,C2&", ","")&IF(COUNTIF(D2:F2,D2)>1,D2&", ","")&IF(COUNTIF(E2:F2,E2)>1,E2&", ","")
That works beautifully! Thanks for your help. That's exactly what I needed.
 
Upvote 0
I'm glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,883
Messages
6,175,167
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