Adrian:

That is an unusual file format, though I see the intent is to be able process a variety of product characteristics.

What if you break the problem into 6 smaller problems? Have a calculated column for each of the 6 characteristics with appropriate logic. Then concatenate the SKU plus those 6 columns together to produce the final string. Would that work?
_________________________
Bruce Gardner
ARX Business Solutions Inc.