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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
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,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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