Forum Discussion
meredith_hurley
Mar 11, 2024Copper Contributor
letters into numerical equivalents?
Hello, I am very new to Excel and can't seem to find an accurate answer.
I aim to convert a string of text in one column into a string of number (A=1, B=2, etc) in a different column. We are looking to generate ID# for clients based on their names. Any suggestions?
5 Replies
- PeterBartholomew1Silver Contributor
Another encoding that you could use for names of up to ten characters is
= DECIMAL(names,36)
The limitation comes about because of the precision to which numbers are held in Excel. To restore the name you would then use the BASE function
= BASE(ID,36)
- PeterBartholomew1Silver Contributor
- meredith_hurleyCopper ContributorThank you Peter!
With a name in B2:
=LET(chars, MID(UPPER(B2), SEQUENCE(LEN(B2)), 1), letters, FILTER(chars,(chars>"A")*(chars<="Z")), codes, CODE(letters)-64, TEXTJOIN(" ", TRUE, codes))
Fill down.
- meredith_hurleyCopper Contributor
HansVogelaar Thank you very much!! This worked perfectly!