Mark Duplicate (Leaving First One) on Multiple Column Comparison

gnaga

Well-known Member
Joined
Jul 9, 2002
Messages
748
Office Version
  1. 365
  2. 2016
  3. 2013
Platform
  1. Windows
Hi,

I need a formula or VBA solution to compare data in the first five columns. If all values in the first five columns are same then leave the first appearance of such row then mark the remaining such row as "DUPLICATE" in the last column. Example Data given below. I need your expertise help to achive this.

Book1
CDEFGHI
4DateTimeMainSub1Sub2ValueRemarks
501-May-224:00:00 PMAppleJuiceMon2
601-May-224:00:00 PMAppleJuiceMon2.1Duplicate
701-May-224:00:00 PMAppleSaladMon1.9
802-May-224:00:00 PMOrangeJuiceMon3
902-May-224:00:00 PMOrangeJuiceMon5Duplicate
1002-May-224:00:00 PMOrangeJuiceMon3.7Duplicate
1104-May-222:30:00 PMGrapeJuiceMon8
1204-May-222:45:00 PMGrapeJuiceMon2.7
1305-May-222:15:00 PMMangoJuiceMon1
1406-May-222:15:00 PMMangoJuiceMon6
Sheet1
Cell Formulas
RangeFormula
I6,I9:I10I6="Duplicate"
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
How about
Excel Formula:
=IF(COUNTIFS(C$5:C5,C5,D$5:D5,D5,E$5:E5,E5,F$5:F5,F5,G$5:G5,G5)>1,"Duplicate","")
 
Upvote 0
Solution
Thank you so much Fluff 🙏. It works Fine.
 
Upvote 0
Glad to help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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