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:
Assign numeric values:
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.
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:
ID | Brand.1.1 | Brand.1.2 | Price.1.1 | Price.1.2 | Preference |
ID001 | Apple | Cereal | 50 | 25 | Cereal |
ID002 | Cereal | Bread | 32 | 41 | Cereal |
ID003 | Bread | Apple | 50 | 32 | Apple |
ID004 | Cereal | Eggs | 41 | 25 | Eggs |
Assign numeric values:
Brand.1.1 | Brand.1.2 | Price.1.1 | Price.1.2 | Preference | |
ID001 | 1 | 3 | 1 | 2 | 1 |
ID002 | 3 | 2 | 3 | 4 | 1 |
ID003 | 2 | 1 | 1 | 3 | 2 |
ID004 | 3 | 4 | 4 | 2 | 3 |
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.