Paste this into the VBA for the worksheet:
The field being checked in this case is B2. Change it to suit your requirements.
If the field is blank entry is allowed otherwise a message is produced and the original value is put back into the cell.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Intersect(Target, Range("B2")) Is Nothing Then Exit Sub
oldvalue = Target
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Range("B2"), Target) Is Nothing Then Exit Sub
If oldvalue <> Target And oldvalue <> VbEmptyValue Then
MsgBox ("Cannot change this value")
Target = oldvalue