Excel pop message

lakshmidudgikar

New Member
Joined
Dec 27, 2022
Messages
2
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Hello Experts

I am pretty new to excel and so I need help..

Background:

So I am creating a template where I have listed around 11 questions. So after 2nd question I need to give a pop up window stating " This change is XYZ" .

To clarify more the condition would be like

If 2nd question values is like 'A, B Or C'
then
"This change is XYZ"
Else
"This change is PQR"
End

Would be great ful if you could help me to solve this issue.

Thank you in advance
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
What do you mean "after 2nd question"? Do you mean after the user answers the second question? How are they providing their answer?

The only way I know of to give a pop-up window, other than data validation if they enter invalid data, is by using VBA. You would put code like this in the module for the sheet containing the questions:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)

   If Target.Address = "$A$1" Then ' replace A1 with actual cell
      If Target = "A" Or Target = "B" Or Target = "C" Then
         MsgBox "This change is XYZ"
      Else
         MsgBox "This change is PQR"
      End If
   End If
   
End Sub
 
Upvote 0
What do you mean "after 2nd question"? Do you mean after the user answers the second question? How are they providing their answer?

The only way I know of to give a pop-up window, other than data validation if they enter invalid data, is by using VBA. You would put code like this in the module for the sheet containing the questions:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)

   If Target.Address = "$A$1" Then ' replace A1 with actual cell
      If Target = "A" Or Target = "B" Or Target = "C" Then
         MsgBox "This change is XYZ"
      Else
         MsgBox "This change is PQR"
      End If
   End If
  
End Sub
Thank you for the quick revert.

Yes I meant after user answers the 2nd question.

Let me try this out and would come back.

Thanks
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,391
Members
448,957
Latest member
Hat4Life

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top