Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Assigning Numeric Identifiers Based on Group

$
0
0
Hi there,

Currently I have a set of data consisting of an unique identifier (ID), four product properties (Brand.1.1, Brand.1.2, ...), and a preference.

What I would like to do is for each product category (i.e. Brand, Price, and Preference) is assign numeric identifiers to values - that is, common values will be assigned the same identifier within each category. If possible, I would also like a legend to be created automatically. It is possible that the same input exists in different categories, but they should not be seen as equivalent to each other.

My current method involves creating a chart of unique values for each category and using lookup functions but this is a slow process when I have multiple product categories to go through (Size, Price, Brand, Warranty, Features, Delivery, etc.).

Example:
IDBrand.1.1Brand.1.2Price.1.1Price.1.2Preference
ID001AppleCereal5025Cereal
ID002CerealBread3241Cereal
ID003BreadApple5032Apple
ID004CerealEggs4125Eggs

Assign numeric values:
Brand.1.1Brand.1.2Price.1.1Price.1.2Preference
ID00113121
ID00232341
ID00321132
ID00434423



Legend:
Brand:
Apple - 1
Bread - 2
Cereal - 3
Eggs -4

Price:
$50 - 1
$25 -2
$32 -3
$41 -4

Preference: (Notice how it has same input-values as Brand but doesn't necessarily assign the same numbers since it's a different category)
Cereal -1
Apple -2
Eggs -3

I imagine VBA will be required but any thoughts/help would be appreciated.

Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>