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

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
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: 30
  • 2022-02-10_14-25-12.png
    2022-02-10_14-25-12.png
    3.9 KB · Views: 26
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,224,551
Messages
6,179,476
Members
452,915
Latest member
hannnahheileen

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