What would be the best way to translate a series of character codes into a description either by a formula or vba. Here are some examples:
[tt]
Cell P2 contains 3, 5, H, ,
Cell P3 contains 1, 2, 3, 4, 5
Cell P4 contains 8, , , ,
[/tt]
These are the definitions:
[tt]
Code Description
1 American Indian or Alaskan Native
2 Asian
3 Black or African American
4 Native Hawaiian or Other Pacific Islander
5 White
8 Prefer Not to Disclose
H Hispanic or Latino
[/tt]
Output Result would be the description and remove extra commas
[tt]
Cell Q2 Black or African American, White, Hispanic or Latino
Cell Q3 American Indian or Alaskan Native, Asian, Black or African American, Native Hawaiian or Other Pacific Islander, White
Cell Q4 Prefer Not to Disclose
[/tt]
[tt]
Cell P2 contains 3, 5, H, ,
Cell P3 contains 1, 2, 3, 4, 5
Cell P4 contains 8, , , ,
[/tt]
These are the definitions:
[tt]
Code Description
1 American Indian or Alaskan Native
2 Asian
3 Black or African American
4 Native Hawaiian or Other Pacific Islander
5 White
8 Prefer Not to Disclose
H Hispanic or Latino
[/tt]
Output Result would be the description and remove extra commas
[tt]
Cell Q2 Black or African American, White, Hispanic or Latino
Cell Q3 American Indian or Alaskan Native, Asian, Black or African American, Native Hawaiian or Other Pacific Islander, White
Cell Q4 Prefer Not to Disclose
[/tt]