Forum Discussion

ChocolateTibi's avatar
ChocolateTibi
Copper Contributor
May 12, 2020
Solved

How to make a function to generate genetic code table?

I would like to make a function which generates the green columns with this character sort. For example, A2 cell is RB and B1 cell is rB the result will be: RrBB (first concatenate the two cell's st...
  • mtarler's avatar
    mtarler
    May 15, 2020

    @ChocolateTibi   BTW, if the other person's prior solution works for you great, but my excel doesn't like SORT or SEQUENCE.  Also, just for fun I thought of another way.  This way is a little more 'generic' in that it doesn't explicitly require "R" first and "B" second but still requires first and second char different: 

    =CHAR(MIN(CODE($A7),CODE(B$6)))&CHAR(MAX(CODE($A7),CODE(B$6)))&CHAR(MIN(CODE(RIGHT($A7,1)),CODE(RIGHT(B$6,1))))&CHAR(MAX(CODE(RIGHT($A7,1)),CODE(RIGHT(B$6,1))))

     

    if you want to combine things like "RR" & "rr" to get "RRrr" the above would have to get expanded to use LARGE and include all 4 characters in each case.

Resources