# Numerical Value of letters in words

1. ## Numerical Value of letters in words

Okay, I know this is strange, but here's my thought and request:
In the English alphabet, we have 26 letters. Assuming A=1, B=2, C=3....Z=26, how would I construct a formula (or a UDF in VBA) to determine the numerical value of the contents of a cell?

For example, if the cell contained "Hello" we would have 8 for H, 5 for E, 12 each for the L's, and 15 for the O.
Adding all of those together, the "value" of the cell would be 52.

If the cell contained "Hello 7" then the "value" would be 52+7, or 59.
We could also assign other constants, like a space = 0, a comma counts as 1, a period as 2, other punctuation = 0.

So, if I had a column of cells, how would I determine the "value" of each cell in that column?

Any bright ideas would be very welcome.

2. ## Re: Numerical Value of letters in words

Please see yellow banner at top page on how to attach a sample workbook, including a complete of characters and their respect values.

3. ## Re: Numerical Value of letters in words

Sure, sample workbook attached.

4. ## Re: Numerical Value of letters in words

Formula:
`Please Login or Register  to view this content.`

"Hello 7" then the "value" would be 52+7
if digets must be 1-1,2-2 ....9-9 then add it in to the list
another
array formula
Formula:
`Please Login or Register  to view this content.`

5. ## Re: Numerical Value of letters in words

Formula:
`Please Login or Register  to view this content.`

6. ## Re: Numerical Value of letters in words

BMV,
Both of your formulas work for the first scenario, and the second one seems to work well for "Hello: 7" so far. Thanks for both. I think I have a chance of understanding the first formula, but the second one scares me to death.

Fluff,
Not sure if it's a typo, but I can't get your formula to work because I don't know what the "co" is in your formula, and neither does Excel. Care to explain?

7. ## Re: Numerical Value of letters in words

It's just a variable used by the LET function.
If you are getting #name, then maybe you don't have the LET function.

8. ## Re: Numerical Value of letters in words

Forgot to attach the file, so here it is.

9. ## Re: Numerical Value of letters in words

Yep, even though I'm on Office 365, our IT department keeps us many version behind, so I don't have the LET function yet.

10. ## Re: Numerical Value of letters in words

In that case if you are happy keeping the values in cols A:B,
Formula:
`Please Login or Register  to view this content.`

11. ## Re: Numerical Value of letters in words

And with a UDF

``Please Login or Register  to view this content.``
``Please Login or Register  to view this content.``

12. ## Re: Numerical Value of letters in words

Here is another UDF that you can try. Just give it a text string or cell value and it will return sum of the value of all the letters and digits in the text...
``Please Login or Register  to view this content.``
Examples:

=SumAlphaNumerics(A1)

=SumAlphaNumerics("AB123")

Note: The quotes in the second example... that is so the function sees it as a text string and does not think it is a cell reference.

13. ## Re: Numerical Value of letters in words

@Rick, at the end in column A there are 4 special characters, which are not taken into account in your UDF. You probably missed that

14. ## Re: Numerical Value of letters in words

Originally Posted by JEC.
@Rick, at the end in column A there are 4 special characters... You probably missed that
Yep, I missed them. Thanks for the heads-up. Here is my revised code to account for them...
``Please Login or Register  to view this content.``

HTML Code:

16. ## Re: Numerical Value of letters in words

Originally Posted by Phuocam
HTML Code:
You missed the colon and semi-colon, both worth 3 points each.

17. ## Re: Numerical Value of letters in words

Originally Posted by Rick Rothstein
You missed the colon and semi-colon, both worth 3 points each.
Hahaha! Have a nice day!

18. ## Re: Numerical Value of letters in words

=SUM(IFERROR(--MID(E3,SEQUENCE(99),1),IFERROR(MOD(TEXT(SEARCH(MID(E3,SEQUENCE(99),1)," ABCDEFGHIJKLMNOPQRSTUVWXYZ12,.:;"),"[>32]32;0"),28)-1,)))

19. ## Re: Numerical Value of letters in words

In G10 then copied down.
Formula:
`Please Login or Register  to view this content.`

For 365 version ARRAY entry not required.

20. ## Re: Numerical Value of letters in words

Cell E9 formula

Formula:
`Please Login or Register  to view this content.`

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1