+ Reply to Thread
Results 1 to 20 of 20

Numerical Value of letters in words

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit
    Posts
    3,704

    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.
    I know I'm not stupid, but I suspect I'm a lot stupider than I think I am

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    23,261

    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.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit
    Posts
    3,704

    Re: Numerical Value of letters in words

    Sure, sample workbook attached.
    Attached Files Attached Files

  4. #4
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: Numerical Value of letters in words

    Formula: copy to clipboard
    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: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by BMV; 01-18-2022 at 04:10 PM.

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    12,364

    Re: Numerical Value of letters in words

    How about
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit
    Posts
    3,704

    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. #7
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    12,364

    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. #8
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    12,364

    Re: Numerical Value of letters in words

    Forgot to attach the file, so here it is.
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit
    Posts
    3,704

    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. #10
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    12,364

    Re: Numerical Value of letters in words

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

  11. #11
    Valued Forum Contributor
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    549

    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. #12
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010, 2019
    Posts
    2,248

    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. #13
    Valued Forum Contributor
    Join Date
    10-11-2021
    Location
    Netherlands
    MS-Off Ver
    365
    Posts
    549

    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. #14
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010, 2019
    Posts
    2,248

    Re: Numerical Value of letters in words

    Quote Originally Posted by JEC. View Post
    @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.

  15. #15
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,437

    Re: Numerical Value of letters in words

    HTML Code: 

  16. #16
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2010, 2019
    Posts
    2,248

    Re: Numerical Value of letters in words

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

  17. #17
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,437

    Re: Numerical Value of letters in words

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

  18. #18
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,038

    Re: Numerical Value of letters in words

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

  19. #19
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    7,249

    Re: Numerical Value of letters in words

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

    For 365 version ARRAY entry not required.
    Attached Files Attached Files
    Last edited by kvsrinivasamurthy; 01-19-2022 at 09:12 AM.
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  20. #20
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Malaysia
    MS-Off Ver
    365 & WPS(2022)
    Posts
    2,205

    Re: Numerical Value of letters in words

    Cell E9 formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA that encodes letters into given numerical values
    By Bananabean in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-07-2019, 12:35 PM
  2. [SOLVED] Giving letters numerical value and calculation with them
    By fedaykin92 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-11-2019, 04:42 AM
  3. Replies: 4
    Last Post: 02-20-2016, 02:44 PM
  4. Replies: 1
    Last Post: 02-06-2013, 05:00 PM
  5. Generating a numerical value from a set of letters - comparing two lists?
    By TheDwarfClunk in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 11-30-2012, 01:02 PM
  6. [SOLVED] Assigning Numerical Values to Letters and Multiplying Them
    By DNAguy in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-16-2012, 09:57 PM
  7. [SOLVED] ASSIGN NUMERICAL VALUES FOR LETTERS in EXCEL 2003
    By legman in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-13-2006, 11:15 PM

Bookmarks

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