Data Validation Question

stwpkcmo

New Member
Joined
Jul 1, 2011
Messages
11
Quick question about data validation dropdowns . . . Is it possible to assign the dropdown fields unique values, but have them display a different text message.
For instance, when I develop in VSNET I can create a dropdown list that will read:
Yes
No
Maybe So

But I can assign each selection a custom numeric value, for instance:
Yes = 1
No = 2
Maybe So = 3


Is this possible in excel, without using VBA?

Thanks for the help!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Without using VBA, I don't know but,
You can try this. change the ranges to suit your data
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
With Range("A10"
        Validation.Delete
        With .Validation
            .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
            xlBetween, Formula1:="=$B$1:$B$5"
        End With
Select Case Range("A10")
    Case "Yes"
        .Value = 1
    Case "No"
        .Value = 2
    Case "Maybe"
        .Value = 3
    Case "I don't know"
        .Value = -1
    Case "Not sure"
        .Value = 0
End Select
End With
End Sub
 
Last edited:
Upvote 0
Thanks villy . . .

I know how to handle the situation with VBA, but that unfortunately is not an option in this instance.

Thanks for the help anyhow
 
Upvote 0
Not with a DV dropdown, no, but you can with a Forms dropdown which by default returns the index number of the selected item, not its text.
 
Upvote 0

Forum statistics

Threads
1,224,585
Messages
6,179,704
Members
452,938
Latest member
babeneker

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