Hello everyone,
I have a problem with the following task.
The first row in my table contains a key code that is composed of letters and numbers. Then the rest of the table contains columns with numbers.
I would like to do the following operation:
If the key code in the first column contains 57D then multiply A with E column. If the key code in the first column contains 62E then multiply B with C column and finally if the first column contains 97F then multiply D with F column and put the results in the column “outcome”.
The key code is a unique generated string and it has either 57D or 62E or 97F.
Down there is an example of what I would like to achieve.
I will be grateful for any suggestions
key_code | A | B | C | D | E | F | outcome |
---|---|---|---|---|---|---|---|
6197FA | 5 | 6 | 1 | 4 | 1 | 6 | 24 |
2562E | 9 | 5 | 5 | 9 | 4 | 4 | 25 |
98562E | 8 | 8 | 69 | 3 | 0 | 7 | 552 |
6997FD | 3 | 3 | 3 | 7 | 9 | 4 | 28 |
6157DA | 1 | 4 | 7 | 5 | 1 | 9 | 1 |
A62E5843 | 0 | 9 | 8 | 8 | 7 | 9 | 72 |
5397FG | 8 | 7 | 2 | 2 | 6 | 6 | 12 |
AC97FF | 7 | 2 | 5 | 2 | 8 | 3 | 6 |
strong text |