Dynamic Drop down Comments (Data Validation)

Tebrica

New Member
Joined
Mar 30, 2020
Messages
13
Office Version
  1. 2016
Platform
  1. Windows
Hi Everyone,

I'm working to have option of presenting various Input Message comments, that would depend on selected value from drop down list.

For example if I choose "Blue" I'd need that comment to present message like "Color of the ocean and sky". Then when I choose "Yellow" (in the very same cell) the message input box should change and say "Color of the sun" etc. If I leave empty / delete then there will not be any message.
There are 5 colors to choose in total (Blue, Yellow, Red, Green, Orange), with respective comments. Then same optionality should be reflected through the range of cells (for example A1:A10).

Now, I don't like the idea of putting this into additional column next to it. I'd just need to guide user on description related to selection made in this sophisticated manner.
My idea is to use Data Validation message boxes, but if that's not feasible, the other option would be to leverage regular comment boxes. Whatever you advice.

Any proposals are welcomed. Couldn't find this one solved so far through my portal looping.

Thanks,
Tebrica
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try this:
This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on the sheet tab
Select View Code from the pop-up context menu
Paste the code in the VBA edit window

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    'Modified  2/10/2022  8:01:55 AM  EST
    If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
    If Target.Cells.CountLarge > 1 Or IsEmpty(Target) Then Exit Sub

    Select Case Target.Value
        Case "Blue": MsgBox "The sky is Blue"
        Case "Yellow": MsgBox "Color of the Sun"
        'Add more here
        
    End Select

End If
End Sub
 
Upvote 0
My script runs when you enter the value in the Range("A1:A10")

And this here is the same but will popup a message if improper value is entered:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    'Modified  2/10/2022  8:13:35 AM  EST
    If Not Intersect(Target, Range("A1:A10")) Is Nothing Then
    If Target.Cells.CountLarge > 1 Or IsEmpty(Target) Then Exit Sub

    Select Case Target.Value
        Case "Blue": MsgBox "The sky is Blue"
        Case "Yellow": MsgBox "Color of the Sun"
        'Add more here
        
    Case Else
        MsgBox Target.Value & vbNewLine & "Is not a proper value"
    End Select

End If
End Sub
 
Upvote 0
Thank you buddy for quick turnaround, however I'm trying to avoid pop-up notification in the middle of the window.
Check attached screenshots what type of comment boxes I'm looking for.

Thanks once again.

Tebrica
 

Attachments

  • 2022-02-10_14-24-20.png
    2022-02-10_14-24-20.png
    14.9 KB · Views: 15
  • 2022-02-10_14-25-12.png
    2022-02-10_14-25-12.png
    3.9 KB · Views: 17
Upvote 0
I thought you want a Message Box to popup.
Sorry. Your wanting a Comment to be entered
Someone else will need to help you with this:
 
Upvote 0

Forum statistics

Threads
1,215,197
Messages
6,123,581
Members
449,108
Latest member
rache47

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