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

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
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
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0
Thanks you so much AlhpaFrog, I got it to work. I really appreciate you taking the time to respond
 
Upvote 0

Forum statistics

Threads
1,213,513
Messages
6,114,064
Members
448,545
Latest member
kj9

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