Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim strExplanation As String
Application.EnableEvents = False
If Target.Cells.Count > 1 Then
MsgBox "you are only allowed to change one cell at a time", vbCritical
Application.Undo
Application.EnableEvents = True
Exit Sub
End If
If Target = "No" Then
furtherDetails:
strExplanation = InputBox("please give an explanation", "further information required")
If strExplanation = "" Then GoTo furtherDetails
Target.AddComment strExplanation
End If
Application.EnableEvents = True
End Sub
This approach is not ideal if you need to prevent the Users doing certain things. I've adde a simple test to ensure they don't try and cheat by entering multiple details at once, and you can see some of the complexity this adds. DO NOT underestimate the ability of even the most educated user to simply screw everything up either deliberately or accidentally!
Enableevents was switched off to stop the worksheet_change triggering undo, with undo in turn triggering worksheet_change, with.... etc etc. Enableevents was switched on again at the end of the routine, otherwise these automatic macros won't run again during this session of Excel. If your code breaks before ending, you will need to switch events back on manually, via the immediate window of the VB Editor
I've added the named code location "furtherDetails", in order to force the user to enter something
If the user goes back and changes something, the comment will remain incorrectly. If they then re-enter the value "no", you will encounter an error because the comment already exists so you cannot add a new one - you should therefore consider automatically deleting any existing comments if the answer is no longer "no"
If trying to collect data in a specific order, with very limited answers, you may need to consider something more complex than this approach, for various reasons. Welcome to the wonderful world of VBA, where nothing is as simple as it first seems...