Data Validation Drop-Down List Unique Selection

samuelaguilar990

New Member
Joined
Aug 9, 2016
Messages
1
Hello,

I have a sheet which has a column that contains cells which are drop-down lists with the same three choices for all of them. I was wondering if there was any way for me to protect the drop-down list cells in order to enforce a unique selection; that means, once an option from the drop-down is selected on a cell, is there any way to block that cell after that first selection so that the selection cannot be changed?

Thanks in advance.
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Start by unlocking all the cells that have a drop down list and then protect the sheet. Then copy and paste this macro into the worksheet code module. Do the following: right click the tab for your sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Change the range in the code to match the range with your drop down lists. If you want to use a password to protect the sheet, the macro will have to be modified. Close the code window to return to your sheet. Make a selection in any drop down.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Application.ScreenUpdating = False
    ActiveSheet.Unprotect
    If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
    Target.Locked = True
    ActiveSheet.Protect
    Application.ScreenUpdating = True
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,714
Messages
6,174,052
Members
452,542
Latest member
Bricklin

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