Dim Mandatory As Range
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target.Cells.Count > 1 Then Exit Sub
Select Case Target.Address
Case “$A$5”, “$A$10”, “$A$15”, “$A$20”, “$A$25”, “$A$30”
Set Mandatory = Target
If Not Mandatory Is Nothing Then
If Mandatory = “” Then
MsgBox “You cannot leave this cell blank”
The above macro will make the cells A5,A10,… mandatory and pressing TAB will prompt user a message “You cannot leave this cell blank” and the focus will remain in the cell.
In case of any issues do drop in a comment or mail to me.