Hello,
I have a macro that a message box opens and the user selects "yes", or "no". If the entry is "no", i want it to populate the next empty cell in a column. How do i accomplish that?
For example in the image below, if a user selects "no", then i would like the macro check the adjacent column, in this case column e to see if it is blank. If it is, then populate the adjacent column d with "no".
So basically, everytime the user presses, "no", then it checks for the next empty cell.
I did a small example in the attached email. Thank you for your help

I have a macro that a message box opens and the user selects "yes", or "no". If the entry is "no", i want it to populate the next empty cell in a column. How do i accomplish that?
For example in the image below, if a user selects "no", then i would like the macro check the adjacent column, in this case column e to see if it is blank. If it is, then populate the adjacent column d with "no".
So basically, everytime the user presses, "no", then it checks for the next empty cell.
I did a small example in the attached email. Thank you for your help
Code:
Sub CJR_Admits()
Dim YesOrNoAnswerToMessageBox As String, QuestionToMessageBox As String
QuestionToMessageBox = "Did you have any CJR patient admissions this month?"
YesOrNoAnswerToMessageBox = MsgBox(QuestionToMessageBox, vbYesNo, "CJR Admits or Not?")
If YesOrNoAnswerToMessageBox = vbNo Then
Range("D1") = "NO"
MsgBox "Thank you for being compliant. Please close the log."
Else
MsgBox "Please proceed to enter data into the log"
End If
End Sub
