Topic: To collect the formula of substitution of values
There is a table
1) the internal code of the goods; 2) the article of the vendor; 3) articles of analogs; 4) the found internal codes
1; 1; 2, 3; 2, 3
2; 2; 1; 1
3; 3; 2, 1; 2, 1
3 the column articles of analogs is a listing of suitable values from the second column
The task - to make substitution of the codes instead of articles
It is necessary to replace values of the third column with suitable values from the first and to interpose all it into the fourth.
It is possible to collect such formula, or only a script?