Display msgbox if duplicates found

bjc124

New Member
Joined
Sep 15, 2020
Messages
9
Office Version
  1. 365
  2. 2019
  3. 2016
Platform
  1. Windows
I'm trying to come up with vba code that will display a message box warning if a duplicate value is entered in Column A if the criteria in the original entry has "Scheduled" in Column G.

For example: Column A Header is "Name" and Column G Header is "Status" and if there is already an entry of John in Column A with the Status of "Scheduled" in Column G in the same row then when I enter John again in Column A I'm wanting it to warn me with a message box that there is already an entry that meets the criteria.

I'm sure I'm making this a lot more complitcated than it should be, but I'm kinda stuck at the moment. Any help is appreciated.
 
Excel will see the change in dropdown list selections as a change. Unfortunately, Excel does not see the Change for a Combobox selection in a linked cell as a change and will not trigger the Change Event. I don't know why the code did not work if it was merged into the BeforeDoubleClick code in the correct place.. You might need to make sure that the variables from the change event code would still apply in the double click code. I just glanced over it and it seemed to me that it could just be copied and pasted and should work. You might have to step through the code to see why it does not work.
 
Upvote 0

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Excel will see the change in dropdown list selections as a change. Unfortunately, Excel does not see the Change for a Combobox selection in a linked cell as a change and will not trigger the Change Event. I don't know why the code did not work if it was merged into the BeforeDoubleClick code in the correct place.. You might need to make sure that the variables from the change event code would still apply in the double click code. I just glanced over it and it seemed to me that it could just be copied and pasted and should work. You might have to step through the code to see why it does not work.

I appreciate it, I found a work around by putting it in the Lost_Focus code.
 
Upvote 0
OK, I will move on to something else.
regards, JLG
 
Upvote 0

Forum statistics

Threads
1,214,998
Messages
6,122,639
Members
449,093
Latest member
Ahmad123098

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