In Microsoft Excel I would like to make a mandatory field "A2" based on the condition of another field "A1". For instance when I select the value 'yes' from a drop down in A1, I want to make the next field "A2" mandatory and it must be a date format. I've found the following code, but I don't know how to modify to the above process.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("A1").Value = "" Then
MsgBox ("You must enter a value for Cell A1")
Any help is greatly appreciated