Automatically run macro that highlights duplicates when user enters data into table.

marcley467

New Member
Joined
Oct 13, 2015
Messages
7
Hello. I use an excel document as a form where serial numbers are entered into a table (Table6). This table can not contain duplicate serial numbers.
I added macro that highlights duplicates within the table but the user would have to run the macro after entering the data... and sometimes this is not done.

Is there a way the macro could automatically run and check for/highlight duplicates when the user enters the sn's into the table? Any help would be greatly appreciated.
 

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.
Convert the macro to a worksheet_change event macro.
 
Upvote 0
Thank you for your response. I had tried to make the macro a worksheet_change event but was unsuccessful.
Could you please provide additional details?
I can't give you more detail than you've given us. How about posting your worksheet with the Table on it using XL2BB (XL2BB - Excel Range to BBCode), and post the code you are using too. Then someone can help you adapt the code to a worksheet_change macro.
 
Upvote 0
This may be a silly response, but I'm assuming you have already tried to Conditionally Format the table and that wasn't what you wanted?
 
Upvote 0
I can't give you more detail than you've given us. How about posting your worksheet with the Table on it using XL2BB (XL2BB - Excel Range to BBCode), and post the code you are using too. Then someone can help you adapt the code to a worksheet_change macro.

My apologies for not including the code or table. I have included both. Thank you again for any help you can give.
 

Attachments

  • dupval.JPG
    dupval.JPG
    34.6 KB · Views: 13
  • table.JPG
    table.JPG
    78.2 KB · Views: 12
Upvote 0

Forum statistics

Threads
1,223,881
Messages
6,175,161
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