Formula to assign individual numbers from a numerical value, to a word of my choosing which helps me create a unique code

For example, the word that I want to use is Neuropathy - N=1, E=2, U=3, R=4, O=5, P=6, A=7, T=8, H=9, Y=0

This way if cell A2 has a number 9324, cell B2 should say HUER.


I hope that makes sense? I need to know which formula to use to get this. Please someone tell me they know how to do this.



MacBook Pro 13″, macOS 12.5

Posted on Jul 10, 2024 1:37 AM

Reply
2 replies

Jul 10, 2024 4:09 AM in response to siddhi188

Your code allows only 10 letters to be mapped.

It makes thing a lot easier if 0 is the first code not the last.



Table 1

C1 =UPPER(B1)

B2 =LEFT(C1,1)

C2 =SUBSTITUTE(C1,B2,"")

Fill down with the formulas in B2 and C2

The numbers in column A are not required for any of the formulas.

If the code word has duplicate letters, only one of them gets a code.


Table 2

Format column A as text so that you can start a code with a 0. If "automatic" or "number", leading zeros will get dropped.

Type the numbers into row 1

B2 =IFERROR(INDEX(Table 1::$B,MID($A2,B$1,1)+2),"")

Fill across to K2

L2 =CONCAT(B2:K2)

Fill down with formulas in B2 though L2


Hide column C in Table 1 and columns B-K in Table 2


This is good for words up to ten letters. Anything longer requires more columns in Table 2 to decode the digits.


This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Formula to assign individual numbers from a numerical value, to a word of my choosing which helps me create a unique code

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.