+ Reply to Thread
Results 1 to 7 of 7

Calculate row sum based on letters representing values in each cell

  1. #1
    Registered User
    Join Date
    09-03-2013
    Location
    Finland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Calculate row sum based on letters representing values in each cell

    Hi,

    How can I calculate a row sum based on cells containing letters and the letters represent values.
    Row: A1= a, B1=a, C1=b, D1=a, E1=c
    a=1
    b=2
    c=3

    A B C D E
    1 a a b a c


    Row sum would be a+a+b+a+c = 1+1+2+1+3 = 8

    Thanks in advance!
    Last edited by antmer; 09-03-2013 at 02:45 AM.

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Calculate row sum based on letters representing values in each cell

    1 way creating a table. Something like this let's say in range J2:K5 .

    a 1
    b 2
    c 3
    d 4

    Then you could use this..

    =SUMPRODUCT((A1:E1=J2:J5)*(K2:K5))
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Registered User
    Join Date
    09-03-2013
    Location
    Finland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Calculate row sum based on letters representing values in each cell

    Thanks I got it working with =COUNTIF(A1:E1;"a")*C$1+COUNTIF(A1:E1;"b")*D$3 etc. C$1, D$3 etc. is the corresponding value for the letter.
    It's a bit ugly but works

  4. #4
    Registered User
    Join Date
    09-03-2013
    Location
    Finland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Calculate row sum based on letters representing values in each cell

    Hey Fotis I continued to working with this
    Quote Originally Posted by Fotis1991 View Post
    =SUMPRODUCT((A1:E1=J2:J5)*(K2:K5))
    but Im having trouble getting it to work. I think I know what you are suggesting here, but does this really work that way?
    Doesnt this require A1:E1 and J2:J5 to be same size? This compares if A1 = J2 is TRUE, B1 = J3 is TRUE etc.
    I need it to compare A1 is one of the values in range J2:J5 -> TRUE

  5. #5
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Calculate row sum based on letters representing values in each cell

    Did you test my suggestion?
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    09-03-2013
    Location
    Finland
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Calculate row sum based on letters representing values in each cell

    THANKS!
    I had the problem my "letter / number" was horizontal
    -----------
    a b c d e f
    1 2 3 4 5 6
    -----------
    switched it to
    a 1
    b 2
    c 3
    etc. and it works! thanks again

  7. #7
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Calculate row sum based on letters representing values in each cell

    You are welcome and thanks for the feed back.

    As that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thank you.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. calculate value based by replacing letters with numbers
    By jbowling in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 06-16-2010, 07:14 PM
  2. Calculate range based on cell values
    By jongleurjon in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 04-09-2009, 07:21 AM
  3. Charts not representing values
    By eiolon in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 08-09-2007, 04:56 PM
  4. Adding Text Values Representing Time
    By ExcelTip in forum Tips and Tutorials
    Replies: 9
    Last Post: 11-29-2006, 05:41 AM
  5. FORMULAS FOR ADDING LETTERS REPRESENTING NUMBERS
    By koolone in forum Excel General
    Replies: 1
    Last Post: 04-08-2005, 08:06 AM

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