+ Reply to Thread
Results 1 to 4 of 4

Assign table value to letters in a string and sum them up.

  1. #1
    Registered User
    Join Date
    02-01-2013
    Location
    Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    2

    Assign table value to letters in a string and sum them up.

    I have not found anything on the forum or anywhere, maybe this is not possible.

    I would like to assign numerical values (from an additional table) to each letter in a string (let's say in E2) and sum them up in F2. Is that at all possible?



    for example:

    string in E2: AGTCV

    values in another table: A=1,G=2,T=5,C=1,V=4

    output in F2: 13

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Assign table value to letters in a string and sum them up.

    try it like this
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    02-01-2013
    Location
    Switzerland
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Assign table value to letters in a string and sum them up.

    That works, thanks a ton!

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Assign table value to letters in a string and sum them up.

    Assuming reference table in A1:B26, in which A1:A26 is alphabet list, B1:B26 is assigned value.
    E2 contains text
    In F2:
    Please Login or Register  to view this content.
    Confirmed with Ctrl-Shift-Enter
    Attached Files Attached Files
    Quang PT

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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