Okay, give this code a try....
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Answer As Long
Dim rCell As Range
Const Col_AM As Long = 39
On Error Resume Next
Application.EnableEvents = False
If Target.Row > 1 And Target.Count = 1 Then
If Target.Column = 1 Then
Target.Offset(0, 1).Resize(, Col_AM - 1).Validation.Delete
If Target.Value <> "" Then
For Each rCell In Target.Offset(0, 1).Resize(, Col_AM - 1)
With Cells(1, rCell.Column).Validation
rCell.Validation.Add Type:=xlValidateList, _
Formula1:=.Formula1, AlertStyle:=.AlertStyle
rCell.Validation.ErrorTitle = .ErrorTitle
rCell.Validation.ErrorMessage = .ErrorMessage
rCell.Validation.InputTitle = .InputTitle
rCell.Validation.InputMessage = .InputMessage
End With
Next
Else
Answer = MsgBox("Do you want to clear the data in this row?", _
vbQuestion Or vbYesNo Or vbDefaultButton2, "Clear Data?")
If Answer = vbYes Then Target.EntireRow.Clear
End If
ElseIf Target.Column >= 2 And Target.Column <= Col_AM And _
Target.Offset(0, 1 - Target.Column).Value = "" Then
MsgBox "Put something in " & Target.Offset(0, 1 - _
Target.Column).Address & " first."
Target.Clear
Target.Select
End If
End If
Application.EnableEvents = True
End Sub
Rick