2

How do I convert the alphabet to number? For example: I have the letter A, B in a column and I want him to think these letters are numbers, eg A = 1, B = 2, I want him to think they are numbers if I am going to use the " Small() "I want him to consider these letters to be values ​​and to give me the smallest value between them, ???enter image description here

1 Answers1

2

I don't understand the last part of your question, but to convert a character into a number use:

=UNICODE(C70)-UNICODE("A")+1

Where the character ('A') is subtracted from the fixed ('A'), both have value 65, and add 1 for offset, so the result is 65-65+1 = 1

You also can use instead of UNICODE("A")+1 the value 64 but the above is more clear.

UPDATE

Copy the formula above in columns D70-D74.

Than create a new item in D74 containing the minimum: just

=MIN(D70:D74)

To convert it back to a character, use:

=CHAR(D76+UNICODE("A")- 1)

Which does the opposite: adding the value of A which is 65, decreasing with 1, resulting in the character of the minimum value.

  • Yes, I want it to fetch the smallest value from the range of "A" to "E" using the formula being displayed in the image. When I drag the fill handle I want it to bring me the letters according to the lowest value they represent within the range – Elienay Junior Oct 04 '19 at 15:23
  • It worked! I used a few procedures, it was a little difficult and a little complicated to understand, I used this formula: '=CARACTUNICODE(MENOR(SEERRO(UNICODE($C$70:$C$74);"");LINS($C$70:C70))) – Elienay Junior Oct 04 '19 at 15:44
  • Great to hear ... please upvote my answer (clicking the up arrow) and accept the answer (by clicking the V-mark next to my answer). – Michel Keijzers Oct 04 '19 at 15:45
  • But there was a problem, because when adding more characters, for example: "(Alias, Bali, Car, Dark) etc ... it does not return the strings – Elienay Junior Oct 04 '19 at 15:47
  • If you add more than one letter it does not return. – Elienay Junior Oct 04 '19 at 15:48
  • It only works for single characters ... but how you would convert otherwise a full string into a number (by multiplying the factors of each position?) like first char * 256^3 + second char * 256^2 + third char * 256^1 + fourth char (*256^0) ? you can do that but you get very high numbers fast (resulting in possible overflows/inaccuracies). – Michel Keijzers Oct 04 '19 at 15:49
  • Damn life ... It almost worked out, but it would be great if he returned a whole word to me – Elienay Junior Oct 04 '19 at 15:52
  • 1
    In principle you can use the multiplification method, but only if the word is quite short (few characters) – Michel Keijzers Oct 04 '19 at 16:50