Need pop up from drop down menu - can't figure out how to fix my code

synthesis45

New Member
Joined
Jul 28, 2010
Messages
4
I can't seem to figure out the exact need for my excel sheet. I have a sheet that has drop down menus in B5:AF25. There are many choices, but I'd like a pop up to trigger only if the selection made is either - special project or meeting. I want the pop up to say - please enter a comment by right clicking on this cell. I have this written so far, but I can't seem to figure out how to tell it all columns or my range of columns rather than just column B. I also am not sure how to add the second target value. Any assistance would be greatly appreciated. Thank you!


Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Columns("B")) Is Nothing Then If Target.Value = "Special Project" Then MsgBox "needs comment right click cell", vbExclamation
End Sub
 

Excel Facts

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

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Me.Range("B5:AF25")) Is Nothing Then
        If Not IsError(Application.Match(Target.Value, Array("Special Project", "meeting"))) Then
            MsgBox "needs comment right click cell", vbExclamation, "Comment Required"
        End If
    End If
End Sub

Dave
 
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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