Can I Use a Formula with Data Validation>List

ediejane

New Member
Joined
Feb 24, 2012
Messages
11
Hi.

I am creating a spreadsheet for product attributes, which will ultimately be used for generating product SKUs.

On one sheet of same workbook I created lists for size, color, material, etc. and applied Define Name. On another sheet (same workbook) I created a drop-down list using Data Validation for each attribute. Please note, each attribute option has a long value and short value. For example, if the user selects the color "black" from the drop-down, "black" is the long value, however for the purposes of creating the SKU, the short value for "black" will be "bk" (quotes are not in cells).

Here's where it gets tricky me. How do I convert the long to short? In other words, if "black" is selected from the drop-down, how to I get "bk" to display in the same cell? Is this possible where Data Validation>List has been applied?

Thanks in advance for any help.

Edie-Jane
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
I would give thought as to whether you actually need it to be in the same cell. Can't you have another lookup table (with conversion from long to short), and use a VLOOKUP to generate the SKU in the background?

In other words, if you had a table like this in A1:B3

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]black[/TD]
[TD]bk[/TD]
[/TR]
[TR]
[TD]blue[/TD]
[TD]bl[/TD]
[/TR]
[TR]
[TD]red[/TD]
[TD]rd[/TD]
[/TR]
</tbody>[/TABLE]






your dropdown is in column D, where user selects one of the colors, and then in your SKU column:

Code:
=VLOOKUP($D5, $A$1:$B$3, 2, FALSE) & "1234"

where the SKU would be bk1234, in this example.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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