Data validation and pop up message

DougyJ

New Member
Joined
Apr 30, 2020
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
I have a workbook with 26 sheets in it and I have a column that has a drop down menu as a list, which contains: Phone, Website, Website, Website form. I want to add 'Other' to this selection and when 'Other is selected I want to open a pop up box to give a message . I have tried using data validation but it applies the pop up to all entries, whereas I just want it to open when 'Other' is selected. I have also looked at conditionality formatting but still can't get it to work. Any help would be much appreciated
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,437
Put this in the ThisWorkbook code module.

Change the column number to suit...

Rich (BB code):
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    If Target.Cells.Count = 1 Then
        If Target.Column = 4 Then 'Column D
            If Target.Value = "Other" Then
                MsgBox "Message", vbInformation, "Title"
            End If
        End If
    End If
End Sub
 

DougyJ

New Member
Joined
Apr 30, 2020
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
Hi there, please forgive my ignoarnace but not great with macros or VB, but how do I go about adding this. I can open the code module but can't see where to add this.
 

AlphaFrog

MrExcel MVP
Joined
Sep 2, 2009
Messages
16,437
Open the ThisWorkbook code module by double clicking it.
Paste the code in the edit window.
Change the 4 in the code to whatever column you have the Drop Down lists in.
Change the message box "Message" and "Title" to suit
That's it.

When you make any change in that column, the code will automatically execute.
If the value of the changed cell is "Other", it will show your message.
 

DougyJ

New Member
Joined
Apr 30, 2020
Messages
5
Office Version
  1. 2016
Platform
  1. Windows
Thanks you so much AlhpaFrog, I got it to work. I really appreciate you taking the time to respond
 
Learn Excel from Bill Jelen

Understanding data is crucial, and the easiest place to start is with Microsoft Excel.

Forum statistics

Threads
1,151,608
Messages
5,765,403
Members
425,284
Latest member
fishymuffin

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
Top