Setting Constants for categories

mallen34

New Member
Joined
Jan 19, 2010
Messages
6
I have a excel spread sheet with 250 categories, which need to be converted to a category id number. I want to update this every week and I am wondering if there is a way to define the category name to category id?

So is there a way to set a category name to = a number?

For example I want to convert the following names

Baby Doll = 100
Chemise = 198
Shoes = 200

Thanks

Sexy Fox Clothing
Find me on FACEBOOK
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
A VLOOKUP table will do what you want. In the example below, you have your name/category numbers in A1:B3, that can be changed when you want.
D1 holds the text "Chemise" and E1 the formula =VLOOKUP(D1,A1:B3,2,FALSE), which will return Chemise's value as you change the column B entries.

<table border=1 cellspacing=0>
<tr align="center" bgcolor=#A0A0A0><td width=25> <td width=25><b>A</b><td width=25><b>B</b><td width=25><b>C</b><td width=25><b>D</b><td width=25><b>E</b></tr>
<tr><td align="center" bgcolor=#A0A0A0><b>1</b><td align="left" bgcolor=#FFFFFF>Baby Doll<td align="right" bgcolor=#FFFFFF>100<td align="left" bgcolor=#FFFFFF><td align="left" bgcolor=#FFFFFF>Chemise<td align="right" bgcolor=#FF99CC>198</tr>
<tr><td align="center" bgcolor=#A0A0A0><b>2</b><td align="left" bgcolor=#FFFFFF>Chemise<td align="right" bgcolor=#FFFFFF>198<td align="left" bgcolor=#FFFFFF><td align="left" bgcolor=#FFFFFF><td align="left" bgcolor=#FFFFFF></tr>
<tr><td align="center" bgcolor=#A0A0A0><b>3</b><td align="left" bgcolor=#FFFFFF>Shoes<td align="right" bgcolor=#FFFFFF>200<td align="left" bgcolor=#FFFFFF><td align="left" bgcolor=#FFFFFF><td align="left" bgcolor=#FFFFFF></tr>
</table>
 
Upvote 0

Forum statistics

Threads
1,214,978
Messages
6,122,549
Members
449,089
Latest member
davidcom

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