Hi
I have for example a line of text like this: "abcdef" and I want to vlookup two letters at a time to replace the whole text with something else.
I have a lookup table like this in column A and B:
ab = 1
cd = 2
de = 3
ef = 4
and so on
So function input is this: "abcdef" and output would be "1234"
at first I tried "=VLOOKUP(MID(C1,{1,3,5,7},2),A:B,2,0) but it didnt like this way of doing it so it just returned a match on the first match from MID.
Do you guys know a better solution than brute-forcing by repeating the same formula for each start position in mid?
(=VLOOKUP(MID(C1,1,2),A:B,2,0)&VLOOKUP(MID(C1,3,2),A:B,2,0) etc)
I have for example a line of text like this: "abcdef" and I want to vlookup two letters at a time to replace the whole text with something else.
I have a lookup table like this in column A and B:
ab = 1
cd = 2
de = 3
ef = 4
and so on
So function input is this: "abcdef" and output would be "1234"
at first I tried "=VLOOKUP(MID(C1,{1,3,5,7},2),A:B,2,0) but it didnt like this way of doing it so it just returned a match on the first match from MID.
Do you guys know a better solution than brute-forcing by repeating the same formula for each start position in mid?
(=VLOOKUP(MID(C1,1,2),A:B,2,0)&VLOOKUP(MID(C1,3,2),A:B,2,0) etc)