On your keyboard, press Alt + F11 to open the code window.
Double click ThisWorkbook, and paste in this code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
ActiveSheet.Protect DrawingObjects:=False, Contents:=False, Scenarios:=False
If Range("HireType").Value = "Pre-Hire Re-Hire C to I Conversion" Or Range("HireType").Value = "Pre-Hire - C to I Conversion" Then
Range("C1:C57").Locked = True
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
MsgBox "No Referrals for C to I conversions", vbExclamation, "Warning"
Else
Range("C1:C57").Locked = False
ActiveSheet.Protect DrawingObjects:=False, Contents:=False, Scenarios:=False
End If
End Sub
Note that you need to name your data validation drop down HireType for this code to work.
Bookmarks